Commit Graph

74 Commits

Author SHA1 Message Date
449387c8ed Removed System-Outs to clean up console 2025-12-05 14:18:47 +01:00
237f708a54 Added a ChatGPT generated MiniMaxAI based on the old MiniMaxAI but with alpha-beta pruning and heuristics for Reversi 2025-12-05 14:09:54 +01:00
64016bd3f0 Added a method getWinner() to game interface.Controller now tells gameThreads how to deal with drawing UI and sending a move to server. 2025-12-05 12:16:03 +01:00
38de4f2156 Drawing of board on canvas is now done from bitboards rather than translating. 2025-12-05 01:20:01 +01:00
b3a97a8978 Removed old AI and old files. Added a new generic random AI. game no longer deals with translation. 2025-12-05 01:05:11 +01:00
05dcea03a1 Added comment 2025-12-04 21:27:02 +01:00
76f836b1c1 made more classes deepClonable. 2025-12-04 21:23:26 +01:00
6607918635 Removed souts for debugging 2025-12-04 20:55:05 +01:00
86e740a34a Fixed local and online play for both games 2025-12-04 20:50:58 +01:00
ramollia
be57e25a48 fixed getLegalMoves & getFlips 2025-12-04 20:12:15 +01:00
0993abeec7 Everything is broken 2025-12-04 19:43:03 +01:00
ramollia
7ea45586ae fixed? getLegalMoves 2025-12-04 19:36:38 +01:00
788cf08b49 Merge remote-tracking branch 'origin/276-refactor-the-game-to-use-bitboards-instead' into 276-refactor-the-game-to-use-bitboards-instead 2025-12-04 15:00:41 +01:00
ramollia
d74e7b4517 fixed getLegalMoves 2025-12-04 14:48:35 +01:00
21b489bbe7 Almost done with implementing bitboards. Reversi is broken and artifical players don't work yet. 2025-12-04 14:19:48 +01:00
f4ee992166 Bitboard implemented with scuffed TicTacToe translation done by game. This should be done by the view. 2025-12-04 00:49:49 +01:00
34d83ff7a5 (DOES NOT COMPILE) In-between commit 2025-12-03 22:44:43 +01:00
b3d65e73a0 Merge branch 'Development' into 276-refactor-the-game-to-use-bitboards-instead 2025-12-03 20:39:27 +01:00
Stef
8d77f51355 272 remake game framework interfaces to properly represent vmc (#278)
* Cleaned up a lot of old files and renamed/remade interfaces to better suit the framework

* Broken commit

* Fixed online play

* Better file structure and closer to MVC
2025-12-03 20:35:37 +01:00
ramollia
c25be04ff1 added new classes for the games that use bitboards instead. also combined game with turnbasedgame 2025-12-03 12:51:09 +01:00
Stef
9f55f8e1c7 Merge new framework into development (#269)
* Created a somewhat generic TurnBasedGame thread. Temporary UI that only works for TicTacToe rn. Added a LocalPlayer with the intent to add more players

* (RANDOM COMMIT) Hope it works

* Changes by bas

* Fixed dependency issues

* Fixed major issue in game deepcopy

* Merge conflict fix

* Removed unused import

* Update GTBGT branch from dev branch (#263)

* started a basis for the tutorials, tic tac toe is almost done with some general stuff still to do.

* rest van de tutorials toegevoegd

* Removed views

* Merge conflict fix

* Removed unused import

---------

Co-authored-by: michiel301b <m.brands.3@st.hanze.nl>
Co-authored-by: ramollia <>
Co-authored-by: Bas Antonius de Jong <49651652+BAFGdeJong@users.noreply.github.com>

* Revert "Update GTBGT branch from dev branch (#263)"

This reverts commit 9134d7e343.

* Fixed frontend not using GameController because of spaghetti code.

* Removed unused imports

* GameCanvas not implements a DrawPlayerMove that can be overridden for specific implementations

* Created an event that will request the controller to refresh the UI.

* ADDED DEPENDENCY. Renamed GameControllers to GameManagers, gameThread is not game controller.

* Attempt at adding an online player. I think it doesn't work because of unsubscriben after success not working

* Multiplayer is functional through OnlineThreadBehaviour. Empty slots are currently represented by -1 in the GUI.

* Removed sout spam, added logger than I can't get to work.

* Idek what these changes are

* Te lang geen commit, sorry

* Multiplayer seems to work pretty well now, hopefully I can add the other games soon.

* Added unsubscribe to EventFlow. ListenerHandler now functional. GlobalEventbus now user listenerHandler

* getAllListeners

* Removed nulls

* Inbetween commit of adding Reversi. This is a lot of spaghetti.

* Fixed stress tests

* Fixed typo in NetworkingGameClientHandler that prevented losses from being received

* Missed 2nd typo. Fixed

* Added docs, no more list creation when adding events to the bus.

* Fixed unsubscribe not working.

* Moved away from deprecated functions

* moved from wildcard to typed

* Moved away from deprecated function

* Added debugging to GlobalEventBus

* Fixed cleaning flow

* Fixed unsubscribe all

* Fixed unsubscribe all

* Removed unused import

* Works now with updated EventFlow(). Unsubscribing works. ReversiAIR has an issue where a forced move returns -1 and local play back button doesn't work properly. To be fixed

* Fixed ReversiR issue that caused skip turn desync

* Fixed color mismatch with server and online main player is now correct.

* Added a bunch of java doc and small changes

* Small changes

* Added a new Thread Behaviour to test framework.

* Fixed human error I made in TicTacToeR logic...

* Fixed broken event and wrong player being presented as winner.

* Idk changes

* Fixed PR conflicts

---------

Co-authored-by: michiel301b <m.brands.3@st.hanze.nl>
Co-authored-by: Bas Antonius de Jong <49651652+BAFGdeJong@users.noreply.github.com>
2025-12-02 11:25:22 +01:00
0cb025edb9 Changed the way turns are being stored in TurnBasedGame. 2025-11-27 18:37:34 +01:00
Ticho Hidding
81f4d307a2 fixed turn skip bug
fixed end score bug
now only shows legal and highlight moves when human
2025-11-27 15:41:09 +01:00
Ticho Hidding
295c61c7eb added some comments and made some methods a bit more readable 2025-11-01 15:12:09 +01:00
6dc05e7123 Made connect4 public method private 2025-10-29 20:09:39 +01:00
d1a9f94ee0 Fixed warning "Warning:(27, 12) Copy constructor does not copy field 'mostRecentlyFlippedPieces'", removed unused field 2025-10-29 20:04:50 +01:00
edfb4ffe51 Changed checkForEarlyDraw so it doesn't need a game as input. 2025-10-29 20:03:07 +01:00
be31de4660 Reversi: made method private 2025-10-29 19:51:09 +01:00
ea30e20585 Privated methods that didn't have to be public 2025-10-29 18:05:01 +01:00
d7e370536e Applied encapsulation principle to TurnBasedBame.java 2025-10-29 17:37:21 +01:00
6811890531 Removed unused imports 2025-10-29 17:29:28 +01:00
5da0a02cc8 Refactored Game to follow encapsulation principle 2025-10-29 17:28:43 +01:00
50713c5021 Turned Abstract Method for AI into interface 2025-10-29 15:01:58 +01:00
d17edf7c4a Renamed Interface Playtable to IPlayable 2025-10-29 14:52:19 +01:00
84e257c17c Removed unused imports 2025-10-29 14:50:40 +01:00
925c848fda Moved the Move record into it's own file, seperated from Game 2025-10-29 14:49:43 +01:00
13bac113b7 Turned abstract methods into an interface 2025-10-29 14:37:31 +01:00
068337e01b Removed unused import 2025-10-29 14:27:51 +01:00
44d8ffbef2 Made the GameState enum it's own file and fixed imports 2025-10-29 14:26:41 +01:00
ramollia
5b20909f80 moved score out of game 2025-10-28 11:13:56 +01:00
ramollia
0638a38fc1 moved score out of game 2025-10-28 09:53:33 +01:00
Ticho Hidding
6fb248bec4 spam minder v2 2025-10-27 17:21:50 +01:00
Ticho Hidding
c115fb91af tourney ready 2025-10-27 17:14:36 +01:00
Ticho Hidding
c3f764f33d connect4 with minimax AI 2025-10-19 22:01:33 +02:00
Ticho Hidding
df493a5eba new reversi test (both players no legal moves) 2025-10-19 13:06:46 +02:00
Ticho Hidding
0447f7b0fe added method for sorting the flipped pieces by distance to Move.position 2025-10-19 02:18:11 +02:00
michiel
a3203dd78e Merge remote-tracking branch 'origin/Reversi' into Reversi 2025-10-14 13:40:00 +02:00
michiel
efbab12b10 Tests toegevoegd 2025-10-14 13:39:22 +02:00
Ticho Hidding
8e823b4108 getLegalMoves logic seems fixed //todo write better tests 2025-10-14 13:34:47 +02:00
Ticho Hidding
81abeef843 commit ofzo 2025-10-14 13:12:45 +02:00