codegame 0.7.0

CodeGame framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import java.io.InputStream

import java.io.OutputStream


class DebugInterface(private val inputStream: InputStream, private val outputStream: OutputStream) {
  def send(command: model.DebugCommand) {
    model.ClientMessage.DebugMessage(command).writeTo(outputStream)
    outputStream.flush()
  }
  def getState(): model.DebugState = {
    model.ClientMessage.RequestDebugState().writeTo(outputStream)
    outputStream.flush()
    model.DebugState.readFrom(inputStream)
  }
}