Psellos
Contemporary Development With Functional Programming

Master Schnapsen/66 Webapp

Master Schnapsen/66 was an app for iOS that we wrote in OCaml several years ago. We have recently rewritten it as an app that runs in the browser. The graphics are unchanged, and it still plays two classic card games, Schnapsen and Sixty-Six. Many people consider them the best two-person card games, and we’re inclined to agree. Our app plays at three levels—at the Master level it’s a formidable opponent.

Schnapsen and Sixty-Six are like miniaturized versions of Pinochle, surprisingly easy to play well but challenging to master. If you’re new to the game, there is a Suggest button that makes it easy to get up to speed. It’s like having an expert player to give you advice.

Master Schnapsen/66 at schnapsen.psellos.com

Read all about the app, and the games, on our Schnapsen page.

The Schnapsen Log

The Schnapsen Log is a series of columns about the card game Schnapsen, and how to play like a master. It’s even more like having an expert player to give you advice!

Recent columns:

Planning To Win the Last Trick, Dec 26
How To Open a Suit, Oct 8
The Horns of a Dilemma, Sep 4
Compelling Opponent, Aug 14
Imperfect Information, Jun 24
Singleton Tens, Dec 1

Cassino Webapp

Our first OCaml app for iOS played the classic card game Cassino, and we have rewritten it as a webapp also. The graphics are the same as in the old iOS app. You compete against the app in your browser to see who can capture the most points.

The Cassino app supports three variants of the game. Two variants follow traditional scoring to 21. The third has simplified scoring, for faster and more casual games—good when you’re standing in line for a latte.

Cassino at cassino.psellos.com

You can read all about the app, and the rules of the three variants, on our Cassino page.

OCaml Programming

For many years we have been happy users of the functional programming language OCaml. We used the Bucklescript OCaml compiler to create the two webapps above. It was surprisingly easy to transport the iOS OCaml code to the browser environment.

We also used OCaml to create the Schnapsen/66 and Cassino apps for iOS. Although the work is somewhat out of date, we’re still hosting the pages for the OCaml-to-iOS compilers that we used, and for a set of example programs. Given an up-to-date OCaml-to-iOS compiler, it might be possible for a motivated programmer to resurrect the example programs.

OCaml on iOS

Portland Example App Slide24 Example App Icosablue Example App

Our pages of resources for OCaml programmers showed how to build an OCaml cross-compiler for iOS devices, and how to build an OCaml interface to the iPhone’s OpenGL ES graphics system.

We also have source code for three working example OCaml iOS apps that were packaged to run on iOS devices, Portland, Slide24, and IcosaBlue. The first two show how to use Cocoa Touch from OCaml, and the third shows how to use OpenGL ES.

OCaml on iOS Simulator

Gamut Example App Voronoi Example App Icosablue Example App

The OCaml pages also showed how to build an OCaml compiler for the iOS Simulator, and we have source code for two example apps that were packaged to run in the iOS Simulator, Gamut and Voronoi. In addition, we packaged the IcosaBlue app (described above) for the Simulator as well as for iOS devices.

iOS Development

While porting OCaml to iOS devices and working on our apps, we learned some out-of-the-way things about iOS and iOS development. We wrote them up on the iOS Development page in case they’re useful to other programmers.

Psellos Blog

One of us (Jeffrey) writes an extremely sporadic blog about what we’re doing at Psellos.

Recent posts:

Sliding Tile Puzzle, Self-Contained OCaml Webapp, Mar 21
OCaml iOS Apps Ported to Browser, Feb 24