This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net._ | |
import java.io._ | |
import scala.io._ | |
object BattleshipsClient extends App { | |
val s = new Socket(InetAddress.getByName("localhost"), 8000) | |
lazy val in = new BufferedSource(s.getInputStream()).getLines() | |
val out = new PrintStream(s.getOutputStream()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net._ | |
import scala.io.BufferedSource | |
import java.io._ | |
object HackJune extends App { | |
val addr = "10.112.145.210" | |
val socket = new Socket(InetAddress.getByName(addr), 8000) | |
lazy val source = new BufferedSource(socket.getInputStream()).getLines() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package wlhacknight | |
import scala.io.Source | |
import java.io.File | |
import java.util.Arrays | |
import scala.collection.mutable.ArrayBuffer | |
import scala.collection.immutable.HashMap | |
import scala.util.Random | |
/** |