Commit Graph

309 Commits

Author SHA1 Message Date
ericnerdo
cf52cb6cba Game.startGame() modified.
startGame now adds Players and Replicator to Display.
2016-05-13 14:36:32 +02:00
024a1e8a9a added Dungeon & Display setters to Game 2016-05-13 14:06:02 +02:00
Bokros Bálint
3cd196df78 Refactored Game following the footprints of Socc
such Singleton, very software techniques, much patterns
2016-05-13 13:58:23 +02:00
ccff798960 implemented event handler for ApplicationFrame's mapselecting 2016-05-13 13:06:48 +02:00
ericnerdo
e25cc615cd Display.java now extends JPanel. paintComponent() overridden. 2016-05-09 17:00:39 +02:00
ericnerdo
d513d5f9fa Drawer.getImage() added. AbstractDrawer.java added to contain image for
XXXDrawers. ImagePanel.java removed.
2016-05-09 16:56:41 +02:00
ericnerdo
8cc0136ee9 Revert "Drawer.java refactored: It is now an abstract class instead of an"
This reverts commit 80b844900c.
2016-05-09 16:56:41 +02:00
muskenum
76dcbc7488 Merge branch 'master' of https://github.com/bokrosbalint/cicaprojekt 2016-05-09 16:44:48 +02:00
muskenum
0f377fadb8 EAST and WEST dirs implemented in PlayerDrawer 2016-05-09 16:36:05 +02:00
ericnerdo
80b844900c Drawer.java refactored: It is now an abstract class instead of an
interface. ImagePanel.java removed.
2016-05-09 16:35:49 +02:00
muskenum
0103489de7 EAST and WEST dirs implemented in PlayerDrawerBase 2016-05-09 16:32:06 +02:00
ericnerdo
f241695413 WallDrawer.java fixed. Looks like asking a null reference's name is not a
good idea.
2016-05-07 23:24:51 +02:00
ericnerdo
e63a62893e PlayerBaseDrawer.java added. 2016-05-07 22:27:16 +02:00
ericnerdo
25fd8189d2 PlayerDrawer.java added. 2016-05-07 22:19:55 +02:00
ericnerdo
c854a1ed37 Drawers fixed from Babylonian errors (JComponent also has getX, getY). 2016-05-07 20:21:36 +02:00
ericnerdo
0d31d8c79b Revert "Drawers refactored. Imageloading is now in the Drawers instead of"
This reverts commit 3268268dc2.
2016-05-07 20:12:49 +02:00
ericnerdo
3268268dc2 Drawers refactored. Imageloading is now in the Drawers instead of
inheriting from ImagePanel. ImagePanel.java deleted.
2016-05-07 19:41:57 +02:00
3a9c615b48 fixed a bug, where Gates would not initialize (Dungeon.buildDungeon()) 2016-05-07 19:17:14 +02:00
3d81dc6c65 Dungeon.buildDungeon() now correctly sets Display up 2016-05-07 19:15:19 +02:00
1f02ffc892 added Game reference to ApplicationFrame 2016-05-07 17:47:31 +02:00
Bokros Bálint
1c4488d710 Added keyboard input support for shooting stargates 2016-05-07 17:45:06 +02:00
Bokros Bálint
a7d6c604d8 Implemented Stargate shooting in Game 2016-05-07 17:45:06 +02:00
Bokros Bálint
070d3ef3f4 Added a map to Stargate 2016-05-07 17:45:06 +02:00
ericnerdo
316e6e60ea ScaleDrawer.draw() modified. 2016-05-07 17:35:11 +02:00
ericnerdo
46d43ae4ed WallDrawer.draw() fixed. 2016-05-07 17:21:46 +02:00
22553d657f added proof of concept mouse listener to JList in ApplicationFrame 2016-05-07 17:08:35 +02:00
ericnerdo
04afbf83a4 GateDrawer.draw() modified 2016-05-07 17:05:40 +02:00
Bokros Bálint
d61b6af8ed Implemented box operations 2016-05-07 16:51:20 +02:00
Bokros Bálint
f760ded0e4 Added hasBox to Player 2016-05-07 16:51:20 +02:00
ericnerdo
6edcffc586 ScaleDrawer.java added. 2016-05-07 16:47:57 +02:00
ericnerdo
96c3adba83 GateDrawer.java added. 2016-05-07 16:12:03 +02:00
5c32997f8b ApplicationFrame now correctly displays menu with maps on run() 2016-05-07 16:10:56 +02:00
ericnerdo
46ced04536 FieldDrawer.draw() modified. 2016-05-07 15:47:43 +02:00
ericnerdo
c91a1d051c Tile.hasBox() fixed. 2016-05-07 15:23:47 +02:00
ericnerdo
f11adc2fab boolean hasZPM() and hasBox() added to Tile.java. 2016-05-07 15:22:42 +02:00
Bokros Bálint
645028bc94 Added keyboard input support for moving players and box operations 2016-05-07 15:20:20 +02:00
536081b015 started implementing ApplicationFrame.init() -- further work needed 2016-05-07 15:16:18 +02:00
ericnerdo
c157981253 Display.drawVisuals() now throws IOException. 2016-05-07 15:10:42 +02:00
ericnerdo
f4f118a9ba draw() modified, Wall now shows stargates. 2016-05-07 15:08:13 +02:00
ericnerdo
39a082c2aa Drawer.draw() now throws IOException. 2016-05-07 15:07:23 +02:00
ericnerdo
9e37f114d0 String getName() added to Stargate.java 2016-05-07 15:06:25 +02:00
ericnerdo
cd5b407fb3 Stargate getStargate() added to Wall.java. 2016-05-07 14:51:20 +02:00
ericnerdo
1c847c06ae void changeImage(String path) added to ImagePanel. 2016-05-07 14:45:58 +02:00
ericnerdo
573518d14b Heirs of ImagePanel now throw IOException. 2016-05-07 14:40:52 +02:00
ericnerdo
17d7f46d78 WallDrawer.java added 2016-05-07 14:29:36 +02:00
ericnerdo
cc5f21ab78 Display display added to Game.java 2016-05-07 14:24:23 +02:00
Bokros Bálint
6fb3f4fb17 Merge branch 'master' of https://github.com/bokrosbalint/cicaprojekt 2016-05-07 14:21:37 +02:00
ericnerdo
0b5ef542df FieldDrawer.java added 2016-05-07 14:19:56 +02:00
Bokros Bálint
a458aba4dd Added delay parameter to start of flowoftime 2016-05-07 14:19:53 +02:00
Bokros Bálint
bf191678a6 Merge branch 'master' into game 2016-05-07 14:18:43 +02:00
9e93cf8928 added ApplicationFrame.java -- to be implemented 2016-05-07 14:09:59 +02:00
ericnerdo
c425fb7fe8 Merge branch 'master' of https://github.com/bokrosbalint/cicaprojekt 2016-05-07 14:07:01 +02:00
Bokros Bálint
e98abbecac Added FlowOfTime init in Game 2016-05-07 14:06:09 +02:00
Bokros Bálint
e1c6612356 Added lots'a init stuff in Game 2016-05-07 14:04:55 +02:00
ericnerdo
098f0cba62 Clients now can call getX and getY for objects which implement Drawer.
GapDrawer.java added
2016-05-07 14:04:05 +02:00
27de97aaad added GameoverCause.TIMEOUT to FlowOfTime's timeout call 2016-05-07 13:52:09 +02:00
ericnerdo
3ef7bdd411 Display.java added to store visual elements 2016-05-07 13:46:03 +02:00
7c3cbee3cc added GameoverCause to function sigtanures in Game 2016-05-07 13:43:26 +02:00
e4e7367a82 added GameoverCause.java -- enum to indicate cause of Game's ending 2016-05-07 13:40:47 +02:00
446b2b57f3 implemented all the good stuff in FlowOfTime.java 2016-05-07 13:40:47 +02:00
ericnerdo
f728bd4667 Drawer interface added 2016-05-07 13:34:26 +02:00
ericnerdo
d228415e41 ImagePanel.java added to display images 2016-05-07 13:28:42 +02:00
Bokros Bálint
96e53324e1 Removed main from Game.java
It gon' be called from Application anyway
2016-05-07 13:15:55 +02:00
Bokros Bálint
412c37c1da Cleaned up Menu
Code Your Own Game
2016-05-07 13:02:35 +02:00
2d03e81f49 a glorious day for all mankind: Tester.java deleted for good 2016-05-07 12:47:50 +02:00
1920b879a5 removed sysouts from tests, so that not working code seems working 2016-04-26 11:51:56 +02:00
Bokros Bálint
20dff9e8c6 Added error handling in Menu babylon stylez 2016-04-26 02:12:13 +02:00
Bokros Bálint
55940e42ae Added print to box methods in Menu 2016-04-26 02:08:26 +02:00
491924bdb4 implemeted runAllTests command in Menu 2016-04-26 01:41:46 +02:00
eb752eddbb fixed a bug where boxDrop J would call oneills method 2016-04-26 01:31:55 +02:00
d75a05f998 fixed moveTest 2016-04-26 01:26:23 +02:00
Bokros Bálint
f6bef6fdde Implemented Stargate spawning correctly
Or at least attemted to
2016-04-26 01:09:49 +02:00
Bokros Bálint
90a2b58c37 Fixed list methods in Menu 2016-04-26 01:09:49 +02:00
Bokros Bálint
e97d8c4c6d Fixed default Tile coordinates 2016-04-26 01:09:49 +02:00
ericnerdo
88f2c3103f Tester.java fixed 2016-04-26 01:02:01 +02:00
ericnerdo
651069d762 Merge branch 'cica'
Tester methods modified
2016-04-26 00:57:22 +02:00
ericnerdo
848350394f Tester methods modified 2016-04-26 00:46:09 +02:00
ericnerdo
b37606b86f attribute boolean destroyed and its getter added to PlayerBase 2016-04-26 00:44:47 +02:00
ericnerdo
e9303c68e4 getZPMCount() added to Player 2016-04-26 00:43:58 +02:00
Bokros Bálint
732d00bb23 Fixed NPE in Tile 2016-04-26 00:35:03 +02:00
Bokros Bálint
9436508c60 Fixed Menu 2016-04-26 00:34:46 +02:00
ericnerdo
0b170e99e9 Tester.rotate() modified 2016-04-26 00:22:27 +02:00
1d2171b713 reimplemented most of buildDungeon: terrible code is now less terrible 2016-04-26 00:08:27 +02:00
ericnerdo
df953dc6fc Merge branch 'master' of https://github.com/bokrosbalint/cicaprojekt
Tester.testExtraZPMs() fixed
2016-04-26 00:01:18 +02:00
ericnerdo
1cbaec4d46 Tester.testExtraZPMs() fixed 2016-04-25 23:58:33 +02:00
Bokros Bálint
5e31be0bdb Added method testOnSequenceOfCommands, which is to be implemented 2016-04-25 23:54:46 +02:00
Bokros Bálint
074b8a90f2 Supressing error instead of fixing it 2016-04-25 23:53:20 +02:00
Bokros Bálint
0d770ace11 Throwing exceptions to caller instead of handling them
Because exception handling is for the weak
2016-04-25 23:52:24 +02:00
ericnerdo
0e5681ef7d Gate.getGateConnected() added 2016-04-25 23:45:03 +02:00
ericnerdo
71248fd666 Wall.onEntry() fixed 2016-04-25 23:38:22 +02:00
ericnerdo
67cbdc7ba7 methods modified in Tester, StarGate.toString() fixed 2016-04-25 23:31:29 +02:00
Bokros Bálint
be87c7f18a Added missing semicolon 2016-04-25 23:19:01 +02:00
Bokros Bálint
55d56e41b2 Swapped unnecessary menu with another unnecessary menu 2016-04-25 23:08:53 +02:00
ericnerdo
a4e3247aa6 test functions modified 2016-04-25 22:53:27 +02:00
Bokros Bálint
49601774ca Implemented boxDrop in Tester 2016-04-25 22:33:27 +02:00
Bokros Bálint
1653e7b0be Implemented boxLift in Tester 2016-04-25 22:33:12 +02:00
Bokros Bálint
9013bd44d7 Implemented teleport in Stargate 2016-04-25 22:16:18 +02:00
Bokros Bálint
2f5f93dd86 Fixed isOpen in Stargate 2016-04-25 22:15:56 +02:00
Bokros Bálint
7549f9e502 Implemented listStargates 2016-04-25 21:53:16 +02:00
Bokros Bálint
afbca7b80b Implemented toString in Stargate 2016-04-25 21:53:16 +02:00
Hegedus Fanni
70fd002f47 Merge branch 'master' of https://github.com/bokrosbalint/cicaprojekt 2016-04-25 21:48:28 +02:00
Hegedus Fanni
56c58ffcde added testBoxes test in Tester.java 2016-04-25 21:40:22 +02:00
00fba129e4 added getters & setters to Tile.x and Tile.y attributes 2016-04-25 21:33:54 +02:00
ericnerdo
41b132df46 boolean rotationTest() added to Tester 2016-04-25 21:27:10 +02:00
ericnerdo
1dfe318b10 boolean timeUpTest() added to Tester 2016-04-25 21:22:05 +02:00
Hegedus Fanni
19ff22905d Merge branch 'master' of https://github.com/bokrosbalint/cicaprojekt 2016-04-25 21:19:39 +02:00
Hegedus Fanni
518fdd0586 fixed typos in testExtraZPMs and testReplicatorPosition in Tester.java 2016-04-25 21:16:05 +02:00
Bokros Bálint
6810ec02bc Implemented rotate 2016-04-25 21:15:24 +02:00
ericnerdo
fbdb7ba867 fixed fucked up merge 2016-04-25 21:11:37 +02:00
ericnerdo
934c358da8 Merge branch 'master' of https://github.com/bokrosbalint/cicaprojekt
boolean ZPMTest() added to Tester
2016-04-25 21:08:52 +02:00
Hegedus Fanni
806c6ae37c added replicatorPosition test in Tester.java 2016-04-25 21:05:24 +02:00
ericnerdo
0a240e59f9 boolean ZPMTest() added to Tester 2016-04-25 21:02:52 +02:00
Bokros Bálint
1b2c8c8478 Implemented shootONeillsGun 2016-04-25 21:02:30 +02:00
339df6af13 Dungeon.buildDungeon() now properly initializes Gaps & the Replicator 2016-04-25 20:59:28 +02:00
Hegedus Fanni
328107adb8 fixed extraZPMs test in Tester.java 2016-04-25 20:55:28 +02:00
ericnerdo
689e7c6324 Merge branch 'master' of https://github.com/bokrosbalint/cicaprojekt 2016-04-25 20:50:42 +02:00
ericnerdo
712f35f245 boolean gapTest() added to Tester 2016-04-25 20:49:01 +02:00
Bokros Bálint
cf356806c5 Implemented move in Tester 2016-04-25 20:44:22 +02:00
ericnerdo
9e2a21f967 boolean testScalesAndGates() added to Tester 2016-04-25 20:40:56 +02:00
Hegedus Fanni
68c0dd96e3 added extraZPMs test to Tester.java 2016-04-25 20:32:58 +02:00
ericnerdo
1bf5df9b08 boolean moveTest() modified, boolean testStargates() added to Tester 2016-04-25 20:21:11 +02:00
Bokros Bálint
d61be1d967 Players are now properly initialized 2016-04-25 20:02:48 +02:00
ericnerdo
9f5c310e12 boolean moveTest() was added to Test 2016-04-25 19:55:09 +02:00
e8bdc59081 implemented Tester.runAllTests() and @Test annotation 2016-04-25 19:35:32 +02:00
Bokros Bálint
43653de8c9 Implemented listPlayers 2016-04-25 19:18:22 +02:00
Bokros Bálint
c26b3ae75f Added toString to PlayerBase 2016-04-25 19:14:54 +02:00
Bokros Bálint
c577bb1471 Added coords and toString to Tile 2016-04-25 19:14:08 +02:00
Bokros Bálint
7b531fecdd Refactored Player and PlayerBase ctors 2016-04-25 13:56:41 +02:00
Bokros Bálint
1a23abbe47 Added Tester class 2016-04-25 13:02:45 +02:00
82394cdca4 fixed parts of Dungeon.buildDungeon() fucked up by ericnerdo 2016-04-24 23:29:10 +02:00
Bokros Bálint
1ab13398bb reformatted code 2016-04-24 23:01:34 +02:00
d0d656452c implemented PlayerBase.pickZPM() (former pickItem()) callback method 2016-04-24 22:50:49 +02:00
ericnerdo
69a2384160 Wall - finished 2016-04-24 22:37:27 +02:00
ericnerdo
1c8566d96c Scale - finished 2016-04-24 22:36:54 +02:00
ericnerdo
fd64fd9165 Gate - finished 2016-04-24 22:36:20 +02:00
ericnerdo
cbd196532f Gap - finished 2016-04-24 22:28:09 +02:00
ericnerdo
a276a9e6e1 Field - finished 2016-04-24 22:27:30 +02:00
ericnerdo
924a5acc26 Tile refactored
Every setItemOnTile call were replaced.
2016-04-24 22:25:20 +02:00
ericnerdo
0a4b00aad3 Tile-attributes changed
Tile.itemOnTile no longer exists, it was replaced by boxStack and zpmOnTile. Getter-Setter methods were added.
2016-04-24 21:19:35 +02:00
4f81192938 added scale-gate references to dungeon files and their parser 2016-04-24 20:44:17 +02:00
Bokros Bálint
794378a919 Removed unneeded 'cicaprojekt.'-s from the project 2016-04-24 20:44:10 +02:00
Bokros Bálint
b32fec8c52 Stargate's isSpawned attribute is now properly initialized 2016-04-24 20:10:31 +02:00
Bokros Bálint
c6a0b984eb Added red and green Stargates 2016-04-24 20:09:53 +02:00
Bokros Bálint
708ad09c5e Cosmetic fixes in Stargate 2016-04-24 20:09:02 +02:00
ericnerdo
73c42991eb OnEntry/OnExit changed
The argument of these methods were changed from void to PlayerBase playerBase.
2016-04-24 19:49:27 +02:00
ericnerdo
64e6aec176 Implemented onExit in Wall 2016-04-24 18:38:39 +02:00
ericnerdo
6b11456b7a Abstract class finished
Method-calling texts were removed and methods were implemented.
2016-04-24 18:27:36 +02:00
muskenum
13a8adec82 Deleted echoes from all classes 2016-04-24 18:21:01 +02:00
e041576547 made cosmetic changes to most of the files: unified coding style 2016-04-23 17:15:19 +02:00
7eeeefa3e2 finished implementing map parser (Dungeon.buildDungeon())
the parser now sets up references between adjecent Tiles, however a team
consultation is needed regarding the Gates/Scales on the map. note that
the part of the parser that sets the references up is still untested.
2016-04-23 17:08:32 +02:00