Java Programming

byu

Master
Joined
Dec 18, 2008
Messages
2,021
Location
California
WCA ID
2009YUBR01
YouTube
Visit Channel
So, I took a course in java this week, it ends today. I'm trying to think of an interesting text-based Java game that I could write, but I'm not sure exactly what. Can any of you give me some suggestions? Thanks.
 
mhmm...Java.

Obviously, a choose-your-own-adventure story, cubing-based, of course.


That would be funny:


You see a 5 move cross or an 8 move X-Cross, which do you do?

All edges are oriented on the LL. If you apply the OLL case, you will get a T-Permutation. If you use COLL, you will get a U-Permutation. Which do you do?

And yes, we covered classes, methodization, constructors, subclassing, String class and its methods, Math class and its methods, and a few other things.
 
Any php classes around where you live... And free plane tickets, and free hotel, and free food, etc. (I know php is a weak language, but I can't afford asp)
 
LOL asp :{

Try writing Conways Game of Life. That was fun when I was just learning.

Code:
$><<"\e[2J";s,o,f,c,u=20,"#"," ";b,m=(z=0..s).map{z.map{(rand<0.3)?o:f
}},[-1,0,1]*3;until c==b;c=b.map{|z|z.dup};$><<"\e[H"<<b.map{|x|x*f}*"
";s.times{|i|s.times{|e|n=(m.sort.zip(m)-[[0,0]]).select{|x,z|o==(c[i+
x]||[])[e+z]}.size;n!=2?b[i][e]=n==3?o:f:f}};sleep 0.2;end

Some code I wrote to do Game of Life, with a bit of help from the ruby-talk mailing list.
 
Last edited:
$><<"\e[2J";s,o,f,c,u=20,"#"," ";b,m=(z=0..s).map{z.map{(rand<0.3)?o:f
}},[-1,0,1]*3;until c==b;c=b.map{|z|z.dup};$><<"\e[H"<<b.map{|x|x*f}*"
";s.times{|i|s.times{|e|n=(m.sort.zip(m)-[[0,0]]).select{|x,z|o==(c[i+
x]||[])[e+z]}.size;n!=2?b[e]=n==3?o:f:f}};sleep 0.2;end


Impressive Joey - I dig the Ruby but Perl wins out over at code golf: http://codegolf.com/conways-game-of-life
 
So, I took a course in java this week, it ends today. I'm trying to think of an interesting text-based Java game that I could write, but I'm not sure exactly what. Can any of you give me some suggestions? Thanks.

A test program for BH-corners and/or edges. That can easily be textbased. The program chooses two random cubies and you shall give the correspondent BH-alg.

I intend to write one myself (but not in Java).
 
Back
Top