Skip to content
This repository was archived by the owner on Feb 29, 2024. It is now read-only.

Commit 4bb5a01

Browse files
authored
Update usacotools.java
1 parent cd5773f commit 4bb5a01

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

usacotools.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
import java.util.*;
22
import java.io.*;
33
public abstract class usacotools {
4+
public static int classify(char x,char off,char on) {
5+
/*
6+
* Method to classify X is off value or on value
7+
* Returns -1 if neither
8+
*
9+
*/
10+
if (x==off){
11+
return 0;
12+
}else if(x==on) {
13+
return 1;
14+
}else {
15+
return -1;
16+
}
17+
18+
}
419
public static int ERROR=1;
520
public static String error="Error";
621
public static int[][] morph(int[][] map,int a,int b){

0 commit comments

Comments
 (0)