{"id":25824176,"url":"https://github.com/natepiano/simulation","last_synced_at":"2026-06-09T02:05:24.366Z","repository":{"id":164476900,"uuid":"76149041","full_name":"natepiano/simulation","owner":"natepiano","description":"simulation of an ios game - used to teach myself scala","archived":false,"fork":false,"pushed_at":"2024-11-12T15:00:13.000Z","size":456,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-05T02:24:23.593Z","etag":null,"topics":["scala","simulation"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/natepiano.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-11T02:12:20.000Z","updated_at":"2024-11-12T15:00:16.000Z","dependencies_parsed_at":"2025-01-12T18:45:47.664Z","dependency_job_id":"cd8ad1d0-c325-4508-b5be-47ae274fc3a3","html_url":"https://github.com/natepiano/simulation","commit_stats":null,"previous_names":["pianonate/simulation","natepiano/simulation"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natepiano%2Fsimulation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natepiano%2Fsimulation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natepiano%2Fsimulation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natepiano%2Fsimulation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natepiano","download_url":"https://codeload.github.com/natepiano/simulation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241150671,"owners_count":19918354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["scala","simulation"],"created_at":"2025-02-28T12:36:43.144Z","updated_at":"2026-06-09T02:05:24.337Z","avatar_url":"https://github.com/natepiano.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"#simulation - learning scala the fun way\nI'm using this game simulation to teach myself to code in scala.\nCheck it out if you're new to scala and \nyou may find something interesting to you. \nI'm trying to code idiomatically, but i'm not quite there yet.  In fact one thing I've discovered \nis that given how performance dependent the simulations are, I've had to move away\nfrom idiomatic scala in order to achieve performance goals.  while loops rather than\nfor comprehensions, just as an example.  \n\n\nThe simulation is based on an [IOS game](https://itunes.apple.com/us/app/1010!/id911793120?mt=8) \nthat I've wasted too much time playing (thanks, Kevin). So I thought I'd teach \nthe computer to play the game and see if I can make it get a higher score than I do \nbecause it will make fewer mistakes than I make.  (mission accomplished)\n\nThe game is kind of a reverse-tetris.  Where three pieces are provided and then\nyou have to choose which piece to play where - and in which order.  The goal is\nto continually clear lines based on piece placement so that as you get more pieces\nyou can continue to play (that's the tetris-like capability)\n\n\nStats:\n* right now my own top score playing the IOS game is 24,594  \n* simulation top score:  11,026,436!!! (beats the top human score, I've been told)\n* long term goal - simulation never loses\n\nAlso - feel free to contribute. \n\nIt would be cool if you wrote your own simulation to see if you can beat my top score.\n\nEnjoy\n\n## get things going\n\ninstall java 8 (you can go to oracle but for me it was simpler to just use brew)\n\n```\n$ brew cask install java\n```\n\ninstall sbt via instructions here: http://www.scala-sbt.org/download.html\n\nagain the brew way\n```\n$ brew install sbt\n```\n\ni don't recall if sbt does a dependency check for scala when installing via brew. if it does\nthen install scala first (https://www.scala-lang.org/download/)\n\n```\n$ brew install scala \n```\n\ninstall git via instructions here: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git \n\nor just use brew\n\n```\n$ brew install git\n```\n\nclone this repository wherever you want\n```\n$ git clone https://github.com/rhialtotm/simulation\n```\n\nthen from the same location you cloned the repository, \nuse packInstall which is provided by the awesome: https://github.com/xerial/sbt-pack \n\n```\n$ sbt packInstall\n```\n\nwhich will create a runnable script in ~/local/bin\n\nthen run simulate from command line either from \n\n```\n$ ~/local/bin/simulate\n```\n\nor if you add `~/local/bin` to your path then just\n\n```\n$ simulate\n```\n\nonce you've cloned the repository, any time you want to pick up the latest and greatest just run \n```\n$ git pull\n```\nfrom the same directory you originally did the `git clone`\n\nenjoy the fun!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatepiano%2Fsimulation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatepiano%2Fsimulation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatepiano%2Fsimulation/lists"}