NPEs occur when you attempt to dereference (use the dot operator) on a null value. The line you're getting your NPE only contains one derference on your gameboard variable, so my guess is that...