brewersfan1976

whoseMove.rb

Mar 1st, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.39 KB | None | 0 0
  1. def whoseMove(lastPlayer, win)
  2.     if lastPlayer == "white" and win == true then
  3.         return "white"
  4.     end
  5.        
  6.     if lastPlayer == "white" and win == false then
  7.        return "black"
  8.     end
  9.        
  10.     if lastPlayer == "black" and win == true then
  11.        return "black"
  12.     end
  13.        
  14.     if lastPlayer == "black" and win == false then
  15.        return "white"
  16.     end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment