Added populateBoard and changed some For loops
Added populateBoard and changed some forLoops