private void printFace(Face face) { Console.Write("\n{0}\n\n", FaceHandler.getCharValue(face)); Console.Write("{0} {1} {2}\n", getColor(face, LocationInFace.TOPLEFT), getColor(face, LocationInFace.TOP), getColor(face, LocationInFace.TOPRIGHT)); Console.Write("{0} {1}\n", getColor(face, LocationInFace.LEFT), getColor(face, LocationInFace.RIGHT)); Console.Write("{0} {1} {2}\n", getColor(face, LocationInFace.BOTTOMLEFT), getColor(face, LocationInFace.BOTTOM), getColor(face, LocationInFace.BOTTOMRIGHT)); }
public void testFaceGetIntGetChar() { Face myFace = Face.BOTTOM; Assert.AreEqual(1, (int)myFace); Assert.AreEqual('D', FaceHandler.getCharValue(myFace)); myFace = Face.FRONT; Assert.AreEqual(4, (int)myFace); Assert.AreEqual('F', FaceHandler.getCharValue(myFace)); myFace = Face.RIGHT; Assert.AreEqual(2, (int)myFace); Assert.AreEqual('R', FaceHandler.getCharValue(myFace)); myFace = Face.TOP; Assert.AreEqual(0, (int)myFace); Assert.AreEqual('U', FaceHandler.getCharValue(myFace)); myFace = Face.BACK; Assert.AreEqual(5, (int)myFace); Assert.AreEqual('B', FaceHandler.getCharValue(myFace)); myFace = Face.LEFT; Assert.AreEqual(3, (int)myFace); Assert.AreEqual('L', FaceHandler.getCharValue(myFace)); }