From 9218b030abed8d72392be2dc53c4a197a54e8c0a Mon Sep 17 00:00:00 2001 From: LDDestroier Date: Tue, 13 Nov 2018 23:02:56 -0500 Subject: [PATCH] Update tron --- tron | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tron b/tron index fb9b382..4cae81a 100644 --- a/tron +++ b/tron @@ -461,6 +461,21 @@ local moveTick = function() ageTrails() end +local modem = peripheral.find("modem") + +if modem then + modem.open(modemID) +else + error("You need a modem.") +end + +local sendInfo = function(gameID) + modem.transmit(modemID, modemID, { + player = player, + gameID = gameID + }) +end + local game = function() local p = player[you] local outcome @@ -509,19 +524,6 @@ local game = function() end local decision -local modem = peripheral.find("modem") -if modem then - modem.open(modemID) -else - error("You need a modem.") -end - -local sendInfo = function(gameID) - modem.transmit(modemID, modemID, { - player = player, - gameID = gameID - }) -end local networking = function() local evt, side, channel, repchannel, msg, distance