Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Pentago_9731301
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9731301
Pentago_9731301
Commits
17fe9228
Commit
17fe9228
authored
Apr 06, 2020
by
9731301
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Pentago Class
parent
43e33a78
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
28 deletions
+47
-28
workspace.xml
.idea/workspace.xml
+27
-11
Pentago.class
out/production/MyPentago/Pentago.class
+0
-0
Block.java
src/Block.java
+1
-0
Pentago.java
src/Pentago.java
+19
-17
No files found.
.idea/workspace.xml
View file @
17fe9228
...
...
@@ -2,7 +2,6 @@
<project
version=
"4"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"63729159-695b-4499-ba7f-f31e81a0234c"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/vcs.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/vcs.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
...
...
@@ -59,6 +58,7 @@
<workItem
from=
"1586099364327"
duration=
"87000"
/>
<workItem
from=
"1586105455800"
duration=
"97000"
/>
<workItem
from=
"1586105975356"
duration=
"8819000"
/>
<workItem
from=
"1586162373379"
duration=
"6300000"
/>
</task>
<servers
/>
</component>
...
...
@@ -66,26 +66,42 @@
<option
name=
"version"
value=
"1"
/>
</component>
<component
name=
"WindowStateProjectService"
>
<state
width=
"1493"
height=
"2
1"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1586117772912
"
>
<state
width=
"1493"
height=
"2
"
key=
"GridCell.Tab.0.bottom"
timestamp=
"1586168477737
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"2
1"
key=
"GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824"
timestamp=
"1586117772912
"
/>
<state
width=
"1493"
height=
"2
1"
key=
"GridCell.Tab.0.center"
timestamp=
"1586117772912
"
>
<state
width=
"1493"
height=
"2
"
key=
"GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824"
timestamp=
"1586168477737
"
/>
<state
width=
"1493"
height=
"2
"
key=
"GridCell.Tab.0.center"
timestamp=
"1586168477737
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"2
1"
key=
"GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824"
timestamp=
"1586117772912
"
/>
<state
width=
"1493"
height=
"2
1"
key=
"GridCell.Tab.0.left"
timestamp=
"1586117772912
"
>
<state
width=
"1493"
height=
"2
"
key=
"GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824"
timestamp=
"1586168477737
"
/>
<state
width=
"1493"
height=
"2
"
key=
"GridCell.Tab.0.left"
timestamp=
"1586168477737
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"2
1"
key=
"GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824"
timestamp=
"1586117772912
"
/>
<state
width=
"1493"
height=
"2
1"
key=
"GridCell.Tab.0.right"
timestamp=
"1586117772912
"
>
<state
width=
"1493"
height=
"2
"
key=
"GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824"
timestamp=
"1586168477737
"
/>
<state
width=
"1493"
height=
"2
"
key=
"GridCell.Tab.0.right"
timestamp=
"1586168477737
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"2
1"
key=
"GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824"
timestamp=
"1586117772912
"
/>
<state
x=
"281"
y=
"271"
key=
"com.intellij.ide.util.TipDialog"
timestamp=
"1586106017061
"
>
<state
width=
"1493"
height=
"2
"
key=
"GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824"
timestamp=
"1586168477737
"
/>
<state
width=
"1493"
height=
"358"
key=
"GridCell.Tab.1.bottom"
timestamp=
"1586168209278
"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
x=
"281"
y=
"271"
key=
"com.intellij.ide.util.TipDialog/0.0.1536.824@0.0.1536.824"
timestamp=
"1586106017061"
/>
<state
width=
"1493"
height=
"358"
key=
"GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824"
timestamp=
"1586168209278"
/>
<state
width=
"1493"
height=
"358"
key=
"GridCell.Tab.1.center"
timestamp=
"1586168209278"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"358"
key=
"GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824"
timestamp=
"1586168209278"
/>
<state
width=
"1493"
height=
"358"
key=
"GridCell.Tab.1.left"
timestamp=
"1586168209278"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"358"
key=
"GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824"
timestamp=
"1586168209278"
/>
<state
width=
"1493"
height=
"358"
key=
"GridCell.Tab.1.right"
timestamp=
"1586168209278"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
width=
"1493"
height=
"358"
key=
"GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824"
timestamp=
"1586168209278"
/>
<state
x=
"281"
y=
"271"
key=
"com.intellij.ide.util.TipDialog"
timestamp=
"1586162378517"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
<state
x=
"281"
y=
"271"
key=
"com.intellij.ide.util.TipDialog/0.0.1536.824@0.0.1536.824"
timestamp=
"1586162378517"
/>
<state
x=
"25"
y=
"67"
key=
"new project wizard"
timestamp=
"1586105483065"
>
<screen
x=
"0"
y=
"0"
width=
"1536"
height=
"824"
/>
</state>
...
...
out/production/MyPentago/Pentago.class
View file @
17fe9228
No preview for this file type
src/Block.java
View file @
17fe9228
...
...
@@ -74,4 +74,5 @@ public class Block {
public
ArrayList
<
Cell
>
getAllCells
()
{
return
allCells
;
}
}
src/Pentago.java
View file @
17fe9228
...
...
@@ -22,33 +22,32 @@ public class Pentago {
blocks
.
add
(
block
);
}
j
=
0
;
j
=
0
;
for
(
i
=
0
;
i
<
4
;){
System
.
out
.
print
(
"| "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
).
getColor
()+
" "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++).
getColor
()
+
" "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++).
getColor
()
+
" |"
);
if
(
i
==
3
&&
j
==
8
){
System
.
out
.
print
(
"| "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++
).
getColor
()+
" "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++).
getColor
()
+
" "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++).
getColor
()
+
" |"
);
if
(
i
==
3
&&
j
==
9
){
break
;
}
if
((
i
==
0
||
i
==
2
)
&&
j
==
2
){
if
((
i
==
0
||
i
==
2
)
&&
j
==
3
){
i
++;
j
=
0
;
}
else
if
((
i
==
0
||
i
==
2
)
&&
j
==
5
){
else
if
((
i
==
0
||
i
==
2
)
&&
j
==
6
){
i
++;
j
=
3
;
}
else
if
((
i
==
0
||
i
==
2
)
&&
j
==
8
){
else
if
((
i
==
0
||
i
==
2
)
&&
j
==
9
){
i
++;
j
=
6
;
}
else
if
((
i
==
1
)&&
j
==
8
){
else
if
((
i
==
1
)&&
j
==
9
){
i
=
2
;
j
=
0
;
System
.
out
.
println
(
"\n------------------"
);
continue
;
}
else
if
(
(
j
==
2
||
j
==
5
)
&&
(
i
==
1
||
i
==
3
)){
else
if
(
(
j
==
3
||
j
==
6
)
&&
(
i
==
1
||
i
==
3
)){
i
--;
j
++;
System
.
out
.
println
();
}
}
...
...
@@ -71,33 +70,36 @@ public class Pentago {
// System.out.println("plz enter how change position? right/left");
// turn = scanner.next().trim();
// blocks.get(blockNumber).changePositionOfBlock(turn);
j
=
0
;
i
=
0
;
System
.
out
.
println
(
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++).
getColor
()+
" "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++).
getColor
());
j
=
0
;
for
(
i
=
0
;
i
<
4
;){
System
.
out
.
print
(
"| "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
).
getColor
()+
" "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
+
1
).
getColor
()
+
" "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
+
2
).
getColor
()
+
" |"
);
if
(
i
==
3
&&
j
==
8
){
System
.
out
.
print
(
"| "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++).
getColor
()+
" "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++).
getColor
()
+
" "
+
blocks
.
get
(
i
).
getAllCells
().
get
(
j
++
).
getColor
()
+
" |"
);
if
(
i
==
3
&&
j
==
9
){
break
;
}
if
((
i
==
0
||
i
==
2
)
&&
j
==
2
){
if
((
i
==
0
||
i
==
2
)
&&
j
==
3
){
i
++;
j
=
0
;
}
else
if
((
i
==
0
||
i
==
2
)
&&
j
==
5
){
else
if
((
i
==
0
||
i
==
2
)
&&
j
==
6
){
i
++;
j
=
3
;
}
else
if
((
i
==
0
||
i
==
2
)
&&
j
==
8
){
else
if
((
i
==
0
||
i
==
2
)
&&
j
==
9
){
i
++;
j
=
6
;
}
else
if
((
i
==
1
)&&
j
==
8
){
else
if
((
i
==
1
)&&
j
==
9
){
i
=
2
;
j
=
0
;
System
.
out
.
println
(
"\n------------------"
);
continue
;
}
else
if
(
(
j
==
2
||
j
==
5
)
&&
(
i
==
1
||
i
==
3
)){
else
if
(
(
j
==
3
||
j
==
6
)
&&
(
i
==
1
||
i
==
3
)){
i
--;
j
++;
System
.
out
.
println
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment