Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://pastebin.com/5BPbYcxa
- you do that sort of a thing, and your MazeController does all the magic that's needed to get the correct MazeState at the current point in tick-time (and controls tick-time)
- separation of concerns. your maze shit should work regardless of how you're drawing it, or how you're triggering time events
- also, i didn't break; my switch statement, whoops
- that'd be an amazing disaster
- Chris • Mon, 9:23 PM
- Chris Bye (Chriswbye@gmail.com, chriswbye@gmail.com)
- public Interface IStudentMazeSolver{
- //Here's your things for them to do
- }
- public class MazeController(
- public MazeController (IStudentMazeSolver singleStudentSolver){
- }
- }
- public Interface IStudentMazeSolver{
- //Here's your things for them to do
- public Move GetNextMove();
- }
- Chris • 6:19 PM
- Chris Bye (Chriswbye@gmail.com, chriswbye@gmail.com)
- https://martinfowler.com/bliki/InversionOfControl.html
- Chris • 7:00 PM
- Chris Bye (Chriswbye@gmail.com, chriswbye@gmail.com)
- https://pastebin.com/5vdDyLf0
- while (!DISQUALIFIED()){
- //dostuff
- TurnLeft();
- GoForward();
- }
- public bool DISQUALIFIED(){
- return MovesQueue.Count() > 10000;
- }
- public Player(IGameStateRetriever gameStateRetriever){
- }
- public Player(IGameStateRetriever gameStateRetriever, IGameMoveAccepter gameMove){
- }
- https://docs.oracle.com/javase/tutorial/uiswing/concurrency/worker.html
- https://docs.oracle.com/javase/tutorial/uiswing/concurrency/simple.html
- protected void TurnLeft(){
- WaitAWhile();
- This.DoTurnLeftForReal();
- Chris • 17 mins
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement