Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Privacy
Imprint
Contact
Login methods
Sign in
Toggle navigation
Menu
Open sidebar
Mehmet Duhan Tercüman
Connect_Four
Commits
e146c3d7
Commit
e146c3d7
authored
Jul 05, 2021
by
Mehmet Duhan Tercüman
Browse files
Bugfix
parent
a021eb6f
Changes
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
e146c3d7
...
...
@@ -49,13 +49,13 @@ Wenn man das Spiel zurücksetzen möchte, kann man die Taste `R` drücken und da
File blank comment code
-----------------------------------------------------------------------------------------------
app\src\main\java\pis_hu1\gameengine.java 22 9 144
app\src\main\java\pis_hu1\draw.java 12 0 13
2
app\src\main\java\pis_hu1\draw.java 12 0 13
6
app\src\main\java\pis_hu1\gameinterface.java 1 0 8
-----------------------------------------------------------------------------------------------
SUM: 35 9 28
4
SUM: 35 9 28
8
-----------------------------------------------------------------------------------------------
AL : 5
3,52
%
AL : 5
2,77
%
```
<br>
...
...
app/build.gradle
View file @
e146c3d7
...
...
@@ -27,9 +27,13 @@ dependencies {
}
java
{
toolchain
{
languageVersion
.
set
(
JavaLanguageVersion
.
of
(
16
))
}
}
application
{
// Define the main class for the application.
mainClass
=
'PIS_HU1.
App
'
mainClass
=
'PIS_HU1.
Draw
'
}
app/src/main/java/PIS_HU1/Draw.java
View file @
e146c3d7
...
...
@@ -8,6 +8,10 @@ public class Draw extends PApplet {
GameEngine
game
=
new
GameEngine
();
boolean
bot
=
false
;
boolean
drawGame
=
false
;
PImage
icon
;
PImage
winner
;
PImage
botPic
;
PImage
start
;
public
static
void
main
(
String
[]
args
)
{
PApplet
.
runSketch
(
new
String
[]
{
""
},
new
Draw
());
...
...
@@ -18,7 +22,10 @@ public class Draw extends PApplet {
}
public
void
setup
()
{
PImage
icon
=
loadImage
(
"app/src/main/resources/connect-four.png"
);
icon
=
loadImage
(
"connect-four.png"
);
winner
=
loadImage
(
"winner.png"
);
botPic
=
loadImage
(
"robot.png"
);
start
=
loadImage
(
"TitleScreen.png"
);
game
.
reset
();
mainMenu
();
surface
.
setTitle
(
"Connect Four !"
);
...
...
@@ -63,7 +70,6 @@ public class Draw extends PApplet {
}
y
+=
100
;
}
PImage
winner
=
loadImage
(
"app/src/main/resources/winner.png"
);
winner
.
resize
(
350
,
350
);
if
(
game
.
isWin
(
game
.
getPlayerBoard
()[
0
]))
{
background
(
50
,
96
,
114
);
...
...
@@ -78,7 +84,6 @@ public class Draw extends PApplet {
textSize
(
60
);
fill
(
255
);
if
(
bot
)
{
PImage
botPic
=
loadImage
(
"app/src/main/resources/robot.png"
);
text
(
"Bot WON"
,
100
,
100
);
botPic
.
resize
(
350
,
350
);
image
(
botPic
,
150
,
250
);
...
...
@@ -92,7 +97,6 @@ public class Draw extends PApplet {
}
public
void
mainMenu
()
{
PImage
start
=
loadImage
(
"app/src/main/resources/TitleScreen.png"
);
background
(
50
,
96
,
114
);
textSize
(
60
);
fill
(
255
);
...
...
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