Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
502
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. Chris Bye (Chriswbye@gmail.com, chriswbye@gmail.com)
  8. public Interface IStudentMazeSolver{
  9. //Here's your things for them to do
  10. }
  11.  
  12. public class MazeController(
  13. public MazeController (IStudentMazeSolver singleStudentSolver){
  14.  
  15. }
  16.  
  17. }
  18. public Interface IStudentMazeSolver{
  19. //Here's your things for them to do
  20.  
  21.  
  22. public Move GetNextMove();
  23. }
  24. Chris • 6:19 PM
  25. Chris Bye (Chriswbye@gmail.com, chriswbye@gmail.com)
  26. https://martinfowler.com/bliki/InversionOfControl.html
  27. Chris • 7:00 PM
  28. Chris Bye (Chriswbye@gmail.com, chriswbye@gmail.com)
  29. https://pastebin.com/5vdDyLf0
  30. while (!DISQUALIFIED()){
  31. //dostuff
  32. TurnLeft();
  33. GoForward();
  34. }
  35. public bool DISQUALIFIED(){
  36. return MovesQueue.Count() > 10000;
  37. }
  38. public Player(IGameStateRetriever gameStateRetriever){
  39.  
  40. }
  41.  
  42. public Player(IGameStateRetriever gameStateRetriever, IGameMoveAccepter gameMove){
  43.  
  44. }
  45. https://docs.oracle.com/javase/tutorial/uiswing/concurrency/worker.html
  46. https://docs.oracle.com/javase/tutorial/uiswing/concurrency/simple.html
  47. protected void TurnLeft(){
  48. WaitAWhile();
  49.  
  50. This.DoTurnLeftForReal();
  51. Chris • 17 mins
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement