Category Archives: games

Solitaire Game in JavaScript

Computer hacking has increased in recent years.  Criminals can profit from the personal and financial information stolen from the victims they have hacked.  In some cases, weaknesses in Java Applets have been exploited to infect computers with malware.  Web browsers now warn users of the potential risk.  The following discussion describes the differences between Java, Java Applets and JavaScript.

Java is a general programming language that can run on Windows, Linux or Mac computers regardless of computer architecture.  This versatility is accomplished by converting the Java computer programs into bytecodes that are interpreted by a virtual machine.  The Java Virtual Machine (JVM) is a computer program tailored for the specific hardware and operating-system platform.  When you download Java software, the package contains the JVM and Java Plug-in software that enables browsers to execute Java Applets.

A Java Applet is a small application written in the Java language and stored as bytecodes.  When a browser encounters a web page containing a Java Applet, the browser uses the Java Plug-in to decode the instructions indicated by the applet.  The result is usually an interactive web page that the user can use to play a game or perform calculations.  Weaknesses in the web browsers can be exploited by malicious Java applets, and for this reason some mobile browsers do not run Java applets at all, or they issue a security warning that asks for confirmation before allowing Java applets to be executed.  The warnings may discourage users from using particular web pages even when they pose no danger. It is possible that in the future, browsers will not run Java Applets at all.

JavaScript is an interpreted computer programming language that is used by web browsers to interact with the user and control the display of the web page. Except for a similarity in the name, JavaScript is not related to the Java programming language.  Although JavaScript can have some security problems, it does not have the vulnerabilities of Java Plug-ins.  The use of JavaScript is now ubiquitous in many web applications such as Gmail and Google Maps that use Ajax (Asynchronous JavaScript and XML).  The following links let you compare the implementation of a FreeCell Solitaire game implemented as a Java Applet and as a JavaScript application.

FreeCell Solitaire Java Applet

FreeCell Solitaire in JavaScript

How to make an Albert Einstein head from a mango seed

Ripe mangos are sweet, juicy and delicious.  Sometimes you cannot stop sucking on the seed to get every bit of pulp.  When all the pulp is gone, you are left with a hairy seed that is perfect for making doll heads. You can draw facial features with a pen, or cut out faces from magazines and paste them on the seeds.  Mango seed dolls have real hair that you can comb and trim.  Here is a step-by-step guide for making mango seed doll heads.

Eat the mango and remove all the pulp from the seed.  Let it dry and comb the hair from time-to-time as it dries to prevent the hair from matting.  This is the way the mango seed looks after combing.
Cut out a picture of your favorite rock star or scientist.  Make sure the size of the face is approximately the size of the seed.  Paste the picture on the mango seed and comb the hair in a suitable style.  For Einstein we leave the hair a little bit wild.

Here is the finished Einstein head at a party with several clowns.

You can make a two-faced doll by gluing another face to the back side of Albert Einstein.  Since the mango hair is nice and blond we can choose a picture of Marilyn Monroe, but it looks like she had a bad hair day.

Free online games – Classic Arcade Games

card games

Have Fun

Every day we worry about global warming, the stock market, medical insurance coverage, falling real estate values, and the wars in various parts of the world. How depressing! Life is better when we enjoy living. Sometimes, a little amusement can distract us from our problems and improve our mood. When we are happy we tend to be more optimistic and we feel better.

In the following link you will find several classic arcade games that you can play online. Pong, Tetris, various versions of Solitaire, and Pacman are non-violent, whereas Asteroids, Space Invaders, and Donkey Kong require you to battle aliens and monsters. Play a little and unwind!

Psychological techniques that encourage gambling

Casino gambling

I visited Atlantic City during the Labor Day holiday.  The weather was perfect and it was very pleasant to walk along the beach wading in the warm water.  However, Atlantic City is also known for its casinos.  Atlantic City is the Las Vegas of the East Coast.

The casinos are dimly lit, the atmosphere is always filled with cigarette smoke even though there are separate smoking and non-smoking areas, and there is the constant din of the slot machines 24 hours per day.  I risked $20 Dollars in a 25-cent slot machine, and cashed out when the total went up to $50 Dollars after several plays — a $30-Dollar profit.  Other people around me were not so lucky.  I saw several who started with $50 or $100 Dollars and had nothing 30 minutes later.  In the $5-Dollar machines, the money goes even faster.  One pull with a bet of 3 credits costs $15 Dollars.  You can lose $100 Dollars with seven pulls of the handle in less than one minute.  No wonder that the casinos are so rich.  New Orleans is still a disaster zone full of rubble two years after hurricane Katrina destroyed the city in 2005, but the casinos in Biloxi, Mississippi which were also wiped out, were reconstructed in record time.  There is no financial incentive for rebuilding New Orleans, but the casinos would have lost billions of Dollars if they had not been rebuilt promptly.

During my stay in Atlantic City, I paid attention to the players.  I tried to figure out why they kept putting coins in the slot machines even though they kept losing.  I risked another $20 Dollars, and this time I got nothing.  I quit while I was $10 Dollars ahead for my two-day stay. It seems that humans are no more intelligent than fish who go after a shiny lure, get hooked, and become a meal for a fisherman. Casinos have refined the art of taking our money using techniques that take advantage of our greed and our lack of discipline.

Checker-playing computer is unbeatable

Professor Jonathan Schaeffer and his team at the University of Alberta have announced that the game of checkers is solved.[1] Dr Schaeffer is a world authority in artificial intelligence applied to computer games. He developed Chinook, the first program to win a human world championship in any game, and this accomplishment is noted in the Guinness Book of World Records.

Checkers became popular in Spain in the mid-16th century. It is a game played between two players by moving 12 red and 12 black pieces on an 8-by-8 square board. The opponent’s pieces are eliminated by jumping over them. The player who first runs out of pieces or moves is the loser.

Schaeffer and his team proved that checkers, when played perfectly by both opponents, ends in a draw. The scientists worked for 18 years analyzing 500 billion-billion (5 × 1020) possible combinations of moves to find the perfect strategy in any situation.

[1] Checkers Is Solved, Jonathan Schaeffer, et al, Science, (19 July 2007),[DOI: 10.1126/science.1144079]