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
implicit class OrderingOps[T](val ord: Ordering[T]) extends AnyVal { | |
def orElse(ord2: Ordering[T]) = new CompositeOrdering[T](ord, ord2) | |
} | |
final class CompositeOrdering[T]( | |
val ord1: Ordering[T], val ord2: Ordering[T] | |
) extends Ordering[T] { | |
def compare( x: T, y: T ) = { |
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 app.models.world | |
import java.util.UUID | |
import shapeless._ | |
import shapeless.ops.record.Selector | |
import shapeless.record._ | |
import shapeless.syntax.singleton._ | |
trait WObjectStats |
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 app.models.world | |
import java.util.UUID | |
import shapeless._ | |
import shapeless.ops.record.Selector | |
import shapeless.record._ | |
case class Vect2(x: Int, y: Int) | |
case class Bounds(position: Vect2, size: Vect2) |
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 utils.actors | |
import akka.actor.{ActorLogging, Actor, ActorRef} | |
import akka.util.ByteString | |
import scala.reflect.ClassTag | |
object CodedFrameProxy { | |
case class Init(intFramedProxy: ActorRef, decodedMessageHandler: ActorRef) | |
} |
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
{ | |
games: [ | |
{ | |
"title": "Orborun", | |
"description": "Orborun is a 3D run & roll game where your nerves will be put to the test.", | |
"youtube_key": "YnVI9AVWx5U", | |
"start_at_s": 50, | |
"platforms": ["ios", "android", "windows", "osx", "linux", "wp8"], | |
"links": { | |
"google-play": "https://play.google.com/store/apps/details?id=com.bulkypix.orborun", |
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
private void readFrame( | |
byte[] buffer, int frameLength, int leftToRead, Ref<bool> continueReading, | |
Act<Try<Messages.Messages.FromServer>> callback | |
) { | |
Log.debug(string.Format( | |
"Entering #readFrame(frameLength={0}, leftToRead={1})", frameLength, leftToRead | |
)); | |
var stream = tcp.GetStream(); | |
stream.BeginRead(buffer, frameLength - leftToRead, leftToRead, ar => { | |
var bytesRead = stream.EndRead(ar); |
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
#!/usr/bin/env ruby | |
$tracks = [] | |
class Track | |
attr_accessor :no, :hours, :minutes, :seconds, :performer, :song_name | |
def initialize(no, hours, minutes, seconds, title) | |
@no, @hours, @minutes, @seconds = no, hours, minutes, seconds | |
split_title = title.split("-", 2) |
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
#!/usr/bin/env ruby | |
$tracks = [] | |
class Track | |
attr_accessor :no, :hours, :minutes, :seconds, :performer, :song_name | |
def initialize(no, hours, minutes, seconds, title) | |
@no, @hours, @minutes, @seconds = no, hours, minutes, seconds | |
split_title = title.split("-", 2) |
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
def moveAttack[A <: MovableFighter]( | |
world: World, unit: A, | |
target: SearchRes[OwnedObj], strict: Boolean=true | |
)(implicit ev: A#Self =:= A): Result[A] = { | |
moveAndThen(world, unit, target.path, strict) { case (newWorld, movedUnit) => | |
movedUnit.attackWS(target.value, newWorld).right.map(_.map { | |
case (w, u) => (w, u) | |
}) | |
} | |
} |
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 sbt.Keys._ | |
name := "TBS Game" | |
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/" | |
resolvers += Resolver.sonatypeRepo("releases") | |
resolvers += Resolver.sonatypeRepo("snapshots") |