Guest User

Untitled

a guest
Jul 25th, 2017
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. https://pastebin.com/5BPbYcxa
  2. 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)
  3. separation of concerns. your maze shit should work regardless of how you're drawing it, or how you're triggering time events
  4. also, i didn't break; my switch statement, whoops
  5. that'd be an amazing disaster
  6. Chris • Mon, 9:23 PM
  7. public Interface IStudentMazeSolver{
  8. //Here's your things for them to do
  9. }
  10.  
  11. public class MazeController(
  12. public MazeController (IStudentMazeSolver singleStudentSolver){
  13.  
  14. }
  15.  
  16. }
  17. public Interface IStudentMazeSolver{
  18. //Here's your things for them to do
  19.  
  20.  
  21. public Move GetNextMove();
  22. }
  23. Chris • 6:19 PM
  24. https://martinfowler.com/bliki/InversionOfControl.html
  25. Chris • 7:00 PM
  26. https://pastebin.com/5vdDyLf0
  27. while (!DISQUALIFIED()){
  28. //dostuff
  29. TurnLeft();
  30. GoForward();
  31. }
  32. public bool DISQUALIFIED(){
  33. return MovesQueue.Count() > 10000;
  34. }
  35. public Player(IGameStateRetriever gameStateRetriever){
  36.  
  37. }
  38.  
  39. public Player(IGameStateRetriever gameStateRetriever, IGameMoveAccepter gameMove){
  40.  
  41. }
  42. https://docs.oracle.com/javase/tutorial/uiswing/concurrency/worker.html
  43. https://docs.oracle.com/javase/tutorial/uiswing/concurrency/simple.html
  44. protected void TurnLeft(){
  45. WaitAWhile();
  46.  
  47. This.DoTurnLeftForReal();
  48. Chris • 17 mins
Advertisement
Add Comment
Please, Sign In to add comment