import java.util.Hashtable ;
import java.util.Random ;
public class Nim {
public static void main
( String [ ] args
) { Hashtable
< String , String
> msg
= new Hashtable
< String , String
> ( ) ;
msg.put ( "you" , "あなた" ) ;
msg.put ( "comp" , "コンピュータ" ) ;
msg.put ( "took" , "%sが%d個取った\n " ) ;
msg.put ( "take" , "石を取って!(1〜%d) > " ) ;
msg.put ( "cond" , "現在の石の数: %d\n \n " ) ;
msg.put ( "win" , "%sの勝ち\n " ) ;
boolean bVal = rnd.nextBoolean ( ) ;
Env env = new Env( 15 , bVal, msg) ;
System .
out .
printf ( "%sが先攻\n " , bVal
? msg.
get ( "you" ) : msg.
get ( "comp" ) ) ; while ( env.num > 0 ) {
env.read ( ) .eval ( ) .print ( ) ;
}
System .
out .
printf ( msg.
get ( "win" ) , env.
turn ? msg.
get ( "you" ) : msg.
get ( "comp" ) ) ; }
}
aW1wb3J0IGphdmEudXRpbC5IYXNodGFibGU7CmltcG9ydCBqYXZhLnV0aWwuUmFuZG9tOwoKcHVibGljIGNsYXNzIE5pbSB7CiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICAgICAgSGFzaHRhYmxlPFN0cmluZywgU3RyaW5nPiBtc2cgPSBuZXcgSGFzaHRhYmxlPFN0cmluZywgU3RyaW5nPigpOwoKICAgICAgICBtc2cucHV0KCJ5b3UiLCAi44GC44Gq44GfIik7CiAgICAgICAgbXNnLnB1dCgiY29tcCIsICLjgrPjg7Pjg5Tjg6Xjg7zjgr8iKTsKICAgICAgICBtc2cucHV0KCJ0b29rIiwgIiVz44GMJWTlgIvlj5bjgaPjgZ9cbiIpOwogICAgICAgIG1zZy5wdXQoInRha2UiLCAi55+z44KS5Y+W44Gj44GmISgx44CcJWQpID4gIik7CiAgICAgICAgbXNnLnB1dCgiY29uZCIsICLnj77lnKjjga7nn7Pjga7mlbA6ICVkXG5cbiIpOwogICAgICAgIG1zZy5wdXQoIndpbiIsICIlc+OBruWLneOBoVxuIik7CgogICAgICAgIFJhbmRvbSBybmQgPSBuZXcgUmFuZG9tKCk7CiAgICAgICAgYm9vbGVhbiBiVmFsID0gcm5kLm5leHRCb29sZWFuKCk7CiAgICAgICAgRW52IGVudiA9IG5ldyBFbnYoMTUsIGJWYWwsIG1zZyk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGYoIiVz44GM5YWI5pS7XG4iLCBiVmFsID8gbXNnLmdldCgieW91Iik6IG1zZy5nZXQoImNvbXAiKSk7CiAgICAgICAgd2hpbGUgKGVudi5udW0gPiAwKSB7CiAgICAgICAgICAgIGVudi5yZWFkKCkuZXZhbCgpLnByaW50KCk7CiAgICAgICAgfQogICAgICAgIFN5c3RlbS5vdXQucHJpbnRmKG1zZy5nZXQoIndpbiIpLCBlbnYudHVybiA/IG1zZy5nZXQoInlvdSIpIDogbXNnLmdldCgiY29tcCIpKTsKICAgIH0KfQ==
compilation info
Main.java:4: error: class Nim is public, should be declared in a file named Nim.java
public class Nim {
^
Main.java:17: error: cannot find symbol
Env env = new Env(15, bVal, msg);
^
symbol: class Env
location: class Nim
Main.java:17: error: cannot find symbol
Env env = new Env(15, bVal, msg);
^
symbol: class Env
location: class Nim
3 errors
stdout