ID:1981509
 
(See the best response by Konlet.)
Code:
I want to make a "single player" game to play with my friends offline that would work like a board game.

I'm not entirely sure though how I would be able to define the number of players when the game starts, then be able to switch between them.

Any pointers or even links would be greatly appreciated.

Problem description:

Best response
Local co-op, oh?

Well, you can do something like this:
var/global/list/players[] = new


That'll define a global list accessible from any proc which can be used to specify a player and define the number of players.

mob/verb/playerCount(n as num)
players = null
for(var/a in 1 to n)
new/player(n)

mob/Stat()
stat(players.len) //The length of the list 'players' (AKA How far does the index go?)

player
parent_type = /atom/movable //Give it the aspects of atom/movable
New(number)
..()
world.log << "I am player [number]"


That's an easy way to utilize multiple players with a list. If you'd like to grab a player from the list, do like so:

mob/proc/grabPlayer(n as num)
world.log << players[n] //n is the position in the array (list) 'players'.
awesome. and the grabPlayer would set the players[n] to the "active"?
In response to Pongy
hm?
If you wanted to specify which player's turn it is, you could just use a numeric value for representation.

var/turn = 1 //Player 1's turn.

mob/verb/test()
world << players[turn] //References the 'turn' place's value in 'players' list
thanks. that should definitely get me started.
In response to Konlet
It would help to actually fill the players list at some point in that example.