Hmm. I don’t have access to an IDE at the moment, but when I plug this into Scastie it seems to be compiling successfully. (It’s failing at runtime, but that’s expected given that I’m trying to run a desktop application from a web browser.)
So a different question: how are you compiling this? I’m wondering if the issue is environmental.
That said – as I’ve mentioned before, I personally prefer to build stuff with Web UIs these days. If you have any interest in that, I’d recommend the Scala.js SPA tutorial, which is a very idiomatic example of a client-server web application. Or possibly the Hands-on Scala.js tutorial, which provides more information about building something entirely in the client, which works well for a lot of use cases. (You can now build very sophisticated applications purely client-side, if you don’t need persistence. That’s the way I would personally do something like a 2048 game.)