}#end of resoving chosen.move } execute.onestep<-function(b=board, move=onestep[move.decision$move, ], tokenlist=tokens) { player<-as.character(move$player) #replace current spot with dot b[ move$row, move$col ] <-"." #if becomes a king, update info if (move$king & ! is.king(player)) { playerlist<- tokenlist[[ team.vector( player ) ]] newking<-as.character(make.king(player)) playerlist[ ]<-newking tokenlist[[ team.vector( newking ) ]]<-playerlist player<-newking } b[ move$torow, move$tocol ] <- player
}#end of resoving chosen.move } execute.onestep<-function(b=board, move=onestep[move.decision$move, ], tokenlist=tokens) { player<-as.character(move$player) #replace current spot with dot b[ move$row, move$col ] <-"." #if becomes a king, update info if (move$king & ! is.king(player)) { playerlist<- tokenlist[[ team.vector( player ) ]] newking<-as.character(make.king(player)) playerlist[ ]<-newking tokenlist[[ team.vector( newking ) ]]<-playerlist player<-newking } b[ move$torow, move$tocol ] <- player