mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
* 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>
42 lines
1.7 KiB
Java
42 lines
1.7 KiB
Java
package org.toop;
|
|
|
|
import org.toop.app.App;
|
|
import org.toop.framework.audio.*;
|
|
import org.toop.framework.networking.NetworkingClientEventListener;
|
|
import org.toop.framework.networking.NetworkingClientManager;
|
|
import org.toop.framework.resource.ResourceLoader;
|
|
import org.toop.framework.resource.ResourceManager;
|
|
import org.toop.framework.resource.resources.MusicAsset;
|
|
import org.toop.framework.resource.resources.SoundEffectAsset;
|
|
|
|
public final class Main {
|
|
static void main(String[] args) {
|
|
initSystems();
|
|
App.run(args);
|
|
|
|
}
|
|
|
|
private static void initSystems() {
|
|
ResourceManager.loadAssets(new ResourceLoader("app/src/main/resources/assets"));
|
|
new Thread(() -> new NetworkingClientEventListener(new NetworkingClientManager())).start();
|
|
|
|
new Thread(() -> {
|
|
MusicManager<MusicAsset> musicManager = new MusicManager<>(ResourceManager.getAllOfTypeAndRemoveWrapper(MusicAsset.class), true);
|
|
SoundEffectManager<SoundEffectAsset> soundEffectManager = new SoundEffectManager<>(ResourceManager.getAllOfType(SoundEffectAsset.class));
|
|
AudioVolumeManager audioVolumeManager = new AudioVolumeManager()
|
|
.registerManager(VolumeControl.MASTERVOLUME, musicManager)
|
|
.registerManager(VolumeControl.MASTERVOLUME, soundEffectManager)
|
|
.registerManager(VolumeControl.FX, soundEffectManager)
|
|
.registerManager(VolumeControl.MUSIC, musicManager);
|
|
|
|
new AudioEventListener<>(
|
|
musicManager,
|
|
soundEffectManager,
|
|
audioVolumeManager
|
|
).initListeners("medium-button-click.wav");
|
|
|
|
}).start();
|
|
}
|
|
|
|
}
|