Openfl and neko server

Hi, Im making a game in openfl and everything is fine,
but now Im implemening a server. And I Have classes like player, board, cards etc etc… all using openfl.
What I want is to make server use this classes, but pure haxe don’t know a thing about openfl:

    haxe -neko server.n -main Server
Board.hx:5: characters 7-28 : Type not found : openfl.display.Sprite
Server.hx:14: lines 14-63 : Defined in this class
Player.hx:4: characters 7-28 : Type not found : openfl.display.Bitmap
Server.hx:14: lines 14-63 : Defined in this class

so I think maby i could first implement those classes without openfl and then use them im openfl…but in haxe I can’t extend from many classes so if I make for example class Board, I can’t make class BoardDisplay that will extend from Board and Sprite.
Do I have to separate it to two different classes one for display second for logic? It’s make less sence im my case. Is there any other way?

any better way to aproach this? like skip openfl stuff in server class and use them in openfl game?
I’m aware of “#if debug” stuff … maby there is a way to separate it like this:

Class Board #if openfl extends Sprite {

just guessing… :smile:
please help

It is indeed easier to separate logic and view when you do this.

But it’s also possible to compile with openfl, though a lot of graphical operations will fail without a window.
To see the missing parameters to the haxe executable you can look into the generated hxml in Export/os/cpp/haxe/final.hxml