I blogged that.
April 30, 2011
April 7, 2011
Four Aces Solitaire Game
For my web programming class, we were asked to create the game Four Aces Solitaire using javascript.
Here was my attempt at creating the game. Go ahead, see if you can beat it.
The only part that I haven't been able to test was the message saying that you won the game. I've beat the game only a few times before, but didn't think about when the game is over because I was too worried about the game play itself. Once I got the game working properly, I haven't actually been able to beat it since. So let me know if you can.
To play:
The game starts with 4 cards. To get rid of a card, there has to be a higher card of the same suit on the rightmost of the "pile." Ace is obviously the highest, so at the end of the game, you should only be left with the 4 aces on the screen.
If there is a blank row, you can click on any card and move that card, and all cards to the right of it, to the new row.
If there are no more moves, click "Deal" to distribute another 4 cards until you've got through the deck. Once you reach 0 deals remaining, and run out of moves, then you lose. Start a new game and try again!
Let me know how it plays and if there are any issues with it... or at least see if you can win.
Go on... give it a try!
Here was my attempt at creating the game. Go ahead, see if you can beat it.
The only part that I haven't been able to test was the message saying that you won the game. I've beat the game only a few times before, but didn't think about when the game is over because I was too worried about the game play itself. Once I got the game working properly, I haven't actually been able to beat it since. So let me know if you can.
To play:
The game starts with 4 cards. To get rid of a card, there has to be a higher card of the same suit on the rightmost of the "pile." Ace is obviously the highest, so at the end of the game, you should only be left with the 4 aces on the screen.
If there is a blank row, you can click on any card and move that card, and all cards to the right of it, to the new row.
If there are no more moves, click "Deal" to distribute another 4 cards until you've got through the deck. Once you reach 0 deals remaining, and run out of moves, then you lose. Start a new game and try again!
Let me know how it plays and if there are any issues with it... or at least see if you can win.
Go on... give it a try!
March 6, 2011
Just Another Day
My job is so fucking unbelieveable. I'll try to sum it up by first telling you about the folks I work with.
First, there is this supermodel wanna-be chick. Yeah, okay, she is pretty hot, but damn is she completely useless. The girl is constantly fixing her hair or putting on makeup. She is extremely self-centered and has never once considered the needs or wants of anyone but herself. She is as dumb as a box of rocks, and I still find it surprising that she has enough brain power to continue to breathe.
The next chick is completely the opposite. She might even be one of the smartest people on the planet. Her career opportunities are endless, and yet she is here with us. She is a zero on a scale of 1 to 10. I'm not sure she even showers, much less shaves her "womanly" parts. I think she might be a lesbian, because every time we drive by the hardware store, she moans like a cat in heat.
But the jewel of the crowd has got to be the fucking stoner. And this guy is more than just your average pothead. In fact, he is baked before he comes to work, during work, and I'm sure after work. He probably hasn't been sober anytime in the last ten years, and he's only 22. He dresses like a beatnik throwback from the 1960's, and to make things worst, he brings his big fucking dog to work. Every fucking day I have to look at this huge Great Dane walk around half-stoned from the second-hand smoke. Hell, sometimes I even think it's trying to talk with its constant bellowing. Also, both of them are constantly hungry, requiring multiple stops to McDonalds and Burger King, every single fucking day.
Anyways, I drive these fucktards around in my van and we solve mysteries and shit.
First, there is this supermodel wanna-be chick. Yeah, okay, she is pretty hot, but damn is she completely useless. The girl is constantly fixing her hair or putting on makeup. She is extremely self-centered and has never once considered the needs or wants of anyone but herself. She is as dumb as a box of rocks, and I still find it surprising that she has enough brain power to continue to breathe.
The next chick is completely the opposite. She might even be one of the smartest people on the planet. Her career opportunities are endless, and yet she is here with us. She is a zero on a scale of 1 to 10. I'm not sure she even showers, much less shaves her "womanly" parts. I think she might be a lesbian, because every time we drive by the hardware store, she moans like a cat in heat.
But the jewel of the crowd has got to be the fucking stoner. And this guy is more than just your average pothead. In fact, he is baked before he comes to work, during work, and I'm sure after work. He probably hasn't been sober anytime in the last ten years, and he's only 22. He dresses like a beatnik throwback from the 1960's, and to make things worst, he brings his big fucking dog to work. Every fucking day I have to look at this huge Great Dane walk around half-stoned from the second-hand smoke. Hell, sometimes I even think it's trying to talk with its constant bellowing. Also, both of them are constantly hungry, requiring multiple stops to McDonalds and Burger King, every single fucking day.
Anyways, I drive these fucktards around in my van and we solve mysteries and shit.
March 5, 2011
Koch SnowFlake in Java
Here is some code for the koch snowflake written in java for a class I was taking. It uses the StdDraw and Turtle graphics to draw the picture, and a little recursion.
Anyways, here's the code for the snowflake:
Using java KochSnowFlake 3 and java KochSnowFlake 4, I was able to generate the images required for the assignment:
Anyways, here's the code for the snowflake:
/**************************************************
* Compilation: javac KochSnowFlake.java
* Execution: java KochSnowFlake N
* Dependencies: StdDraw.java Turtle.java
*
* Plot an order N Koch snowflake
*
* % java KochSnowFlake 3
*
***************************************************/
public class KochSnowFlake {
private Turtle turtle; // for turtle graphics
private double size; // size of each line segment
public KochSnowFlake(int N) {
int width = 512;
int height = (int) (2 * width / Math.sqrt(3));
size = width / Math.pow(3.0, N);
turtle = new Turtle(0, width * Math.sqrt(3) / 2, 0.0);
turtle.setCanvasSize(width, height);
turtle.setXscale(0, width);
turtle.setYscale(0, height);
// three Koch curves in the shape of an equilateral triangle
koch(N);
turtle.turnLeft(-120);
koch(N);
turtle.turnLeft(-120);
koch(N);
}
public void koch(int n) {
if (n == 0) {
turtle.goForward(size);
}
else {
koch(n-1);
turtle.turnLeft(60);
koch(n-1);
turtle.turnLeft(-120);
koch(n-1);
turtle.turnLeft(60);
koch(n-1);
}
}
public static void main(String[] args) {
int N = Integer.parseInt(args[0]);
new KochSnowFlake(N);
}
}
Using java KochSnowFlake 3 and java KochSnowFlake 4, I was able to generate the images required for the assignment:
You'll probably want these also... Turtle.java and StdDraw.java.
February 21, 2011
Thanks Oracle...
Thanks for turning my home computer into a worthless pile of processing power.
Since taking a database course at the local college, we were required to load a relational database management system, (RDBMS), and was persuaded to use our professor's personal choice, Oracle. He'd worked as a database analyst for Oracle for 5 years, so obviously he choose Oracle over MySQL.
Anyways, loading the nearly 3GB software library, (not including the SQL developer software), and a near 2 hour install, Oracle had successfully installed numerous background processes, a webpage to administer the databases, and took over about 8GB of space on my drive.
Thanks.
Now my computer spends more time optimizing and running background processes for a database system with no database.
Oh... "just uninstall it" you say? Tried. Apparently Oracle uses it's own scripts to install itself, so there is no uninstall process. "Just delete the files and disable the services" you say? Tried. All files are locked even when services are disabled. Perl.exe just continues to run as well as 200MB of RAM being used to run the non-database system.
I'm tired of typing now.
Since taking a database course at the local college, we were required to load a relational database management system, (RDBMS), and was persuaded to use our professor's personal choice, Oracle. He'd worked as a database analyst for Oracle for 5 years, so obviously he choose Oracle over MySQL.
Anyways, loading the nearly 3GB software library, (not including the SQL developer software), and a near 2 hour install, Oracle had successfully installed numerous background processes, a webpage to administer the databases, and took over about 8GB of space on my drive.
Thanks.
Now my computer spends more time optimizing and running background processes for a database system with no database.
Oh... "just uninstall it" you say? Tried. Apparently Oracle uses it's own scripts to install itself, so there is no uninstall process. "Just delete the files and disable the services" you say? Tried. All files are locked even when services are disabled. Perl.exe just continues to run as well as 200MB of RAM being used to run the non-database system.
I'm tired of typing now.
February 3, 2011
January 30, 2011
Trouble At Bird Manor
Awesome drawing by Grimside displaying the eccentricities of relational dynamics.
Never mind the notes across the top... this was obviously done on a small notepad at work, but nevertheless it's terrific and disturbing in it's own right.
Everyone loves worms.
Never mind the notes across the top... this was obviously done on a small notepad at work, but nevertheless it's terrific and disturbing in it's own right.
Everyone loves worms.
Subscribe to:
Posts (Atom)





