Skip to content

Simple word game written in Scala 3. Made from scala3 sample project with beginners in mind.

License

Notifications You must be signed in to change notification settings

spamegg1/scala3-simple-wordgame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbt project compiled with Scala 3

Usage

This is a normal sbt project. You can compile code with sbt compile, run it with sbt run, and sbt console will start a Scala 3 REPL.

For more information on the sbt-dotty plugin, see the scala3-example-project.

Setup and Installation

These are for Windows; Linux and MacOS should be similar/easier.

  1. Download and install AdoptOpenJDK Version 11 at https://adoptopenjdk.net/ Make sure to choose the options to add it to PATH and set JAVA_HOME.

01

  1. Download and install JetBrains IntelliJ IDEA at https://www.jetbrains.com/idea/

02

  1. Reboot.

03

  1. Download and install sbt version 1.5.4 or later (the version is important! It won't work otherwise) at https://www.scala-sbt.org/download.html (you need the .msi installer for Windows).

04

  1. Launch IntelliJ, to go Plugins and install the Scala plugin.

05

  1. Restart IntelliJ.

06

  1. Go to IntelliJ Settings, Build, Execution and Deployment/Build Tools/sbt and point it to your AdoptOpenJDK and sbt installations:

07

  1. Download the repository zip file:

08

  1. Extract it to C:\scala3-simple-wordgame-master.

09

  1. In IntelliJ, click "Open" and navigate to the build.sbt file:

10

  1. Choose "Open as Project":

11

  1. Choose to "Trust":

12

  1. Now wait for about 5 minutes.

13

  1. Eventually it will finish.

14

  1. Open "Terminal" and type sbt. Then type compile.

15

  1. Type test to run the tests.

16

  1. Type run to play the game!

17

TODO:

Need to wrap the interactive portions of the game using the IO Monad. (scalaz or cats maybe?)

Try to get rid of var, mutation, and replace while loops with recursion if possible.

Handle file operations with Using so that even in case of failure the file gets closed (similar to Python's with ... as ... syntax).

About

Simple word game written in Scala 3. Made from scala3 sample project with beginners in mind.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages