forked from dhvanipa/error_deep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New javac csv, and model added neurons
- Loading branch information
Dhvani Patel
committed
Aug 4, 2017
1 parent
694cbc1
commit 520f29f
Showing
6 changed files
with
48,050 additions
and
14,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import java.util.ArrayList; | ||
|
||
public class SimpleDotCom | ||
{ | ||
int [] locationCells; | ||
int numOfHits = 0; | ||
ArrayList<Integer> cells = new ArrayList<Integer>(); | ||
|
||
|
||
public void setLocationCells(int [] locs) | ||
{ | ||
locationCells = locs; | ||
for( int c : locs ){ | ||
cells.add(c); | ||
} | ||
|
||
public String checkYourself (String stringGuess) | ||
{ | ||
int guess = Integer.parseInt(stringGuess); | ||
|
||
String result = "miss"; | ||
|
||
for(int cell : locationCells) { | ||
if( guess == cell) { | ||
result = "hit"; | ||
numOfHits ++; | ||
break; | ||
} | ||
|
||
} | ||
|
||
if (numOfHits == locationCells.length) | ||
{ | ||
|
||
result = "kill"; | ||
} | ||
System.out.println(result); | ||
return result; | ||
|
||
} | ||
|
||
|
||
} |
Oops, something went wrong.