added greedyPlayer
refactored state functions into board