Hacker GitHub

← All repos

darius/sturm

View on GitHub ↗ ★ 8 Python

Simpleminded terminal interface

6 mentions on Hacker News by 1 person: 0 stories, 6 comments · first 2014-07-28 · latest 2023-07-06

Mentions per year 6 mentions · busiest year 2015 (2)
20082026
  1. …I came up with it 16 years ago and still use it. Example of use: the ## comments and #. outputs in https://github.com/darius/sturm/blob/master/tictactoe.py#L20... (It'll need a Python 3 update if you're more up with the times than me.)
    comment by abecedarius · 2023-07-06 · in My Kind of REPL
  2. …one was for Sudoku in particular. This grid represents variables as rows and clauses as columns. https://github.com/darius/sturm/blob/master/satgame.py (Python 2)
  3. Another, in Python: https://github.com/darius/sturm/blob/master/2048.py This one animates the sliding of the pieces. The terminal input-handling might not work in your OS -- I gave up trying to find a nice cross-platform approach to that.
  4. …break ties in the evaluation function according to the expected value for random players: https://github.com/darius/sturm/blob/master/tictactoe.py#L12... (spock_play is what the OP called fatalistic, max_play is more like a human.)
  5. That looks good. For counterpoint, here is my 2048 including tests for just the tricky bit: https://github.com/darius/sturm/blob/master/2048.py I have Emacs set up to run them on a keypress without even having to save the file; you can…
  6. And here's a text-terminal version in a couple pages of Python: https://github.com/darius/sturm/blob/master/sokoban.py -- I'd like to see more small, readable game implementations to learn from.
    comment by abecedarius · 2014-07-28 · in Game about squares