Est-ce votre entreprise ?
Write pseudo code for a function that accepts a Board class that contains three public methods and will return whether the Board passed in is “solvable”. The three Board methods include “canMove” that accepts a direction parameter, move() that accepts a direction parameter, and “isSolvable” that returns a boolean of whether or not the board passed in is “solvable”.
Utilisateur anonyme
Was able to write psuedo code that completed the exercise after spending quite a bit of time trying to clarify the problem I’m trying to solve. (Is the direction parameter a string? What determines what the “isSolvable” method should return? What constitutes as a “solveable” Board? Why can’t I just return the isSolvable method in my function and call it a day?, How many directions does the “canMove” and “move” methods accept? etc)