Skip to main content

All Questions

Tagged with
4 votes
1 answer
160 views

Improving Mancala Game

https://www.mastersofgames.com/rules/mancala-rules.htm I am trying to create a working Mancala Game in scala, Currently, I have 3 classes, Board, ...
Dahiben Kumar's user avatar
4 votes
1 answer
196 views

Rewriting scala code in object-oriented style style to reduce repetitive use of similar functions

I need help in rewriting my code to be less repetitive. I am used to coding procedural and not object-oriented. My scala program is for Databricks. how would you combine cmd 3 and 5 together? Does ...
Dung Tran's user avatar
  • 143
3 votes
1 answer
83 views

How to make it more Scala compatible?

When you write a code in python code people always ask to make it more pythonic. I am not sure if there is a term for scala or not. However, I am pretty sure my following code use one or two scala ...
Gaurang Shah's user avatar
0 votes
2 answers
71 views

A better OOP way for solution

I am implementing a functionality in Scala to Copy files from one FileSystem to another ...
Gaurang Shah's user avatar
2 votes
1 answer
372 views

Sorting lists by various measures of goodness [closed]

...
Azula's user avatar
  • 139
5 votes
1 answer
401 views

Fight simulator

I have been learning Scala for a couple months and want to get a more concrete understanding of proper oop practice. I find it difficult to optimally use traits, abstract classes and inheritance. <...
Shawn Anderson's user avatar
3 votes
1 answer
191 views

Functional SaveObject in Scala

I came across Java like Scala code that I am trying to refactor to make it functional and immutable. The first obvious flaw is that it's violating thread safety by using mutable public class level ...
user2066049's user avatar
3 votes
0 answers
924 views

Testing Scala code which depends on objects

I am writing a small oauth2 library for Play! 2.1 scala. As I am still learning I got stuck trying to TDD and ended up writing the code first, then refactoring for testability. By testability I mean ...
Jean's user avatar
  • 528
5 votes
2 answers
838 views

Typesafe Tic-Tac-Toe API

So I've been working on Tony Morris' Tic-Tac-Toe challenge. The rules are as follows: Write an API for playing tic-tac-toe. There should be no side-effects (or variables), at all, for real. The ...
Dominic Bou-Samra's user avatar
2 votes
1 answer
305 views

Scala object-function balance

I am learning Scala, coming from Java background. Here I have written a small prototype proof of concept program that is a part of concept base for a simple upcoming tutorial game. There are two game ...
noncom's user avatar
  • 123