MCPcopy Create free account
hub / github.com/careercup/ctci / convertIntToPiece

Method convertIntToPiece

java/Chapter 17/Question17_2/QuestionB.java:197–205  ·  view source on GitHub ↗
(int i)

Source from the content-addressed store, hash-verified

195 }
196
197 public static Piece convertIntToPiece(int i) {
198 if (i == 1) {
199 return Piece.Blue;
200 } else if (i == 2) {
201 return Piece.Red;
202 } else {
203 return Piece.Empty;
204 }
205 }
206
207 public static void main(String[] args) {
208 for (int k = 0; k < 100; k++) {

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected