Skip to content

Commit

Permalink
Update websocket server URL
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNisnevich committed Mar 13, 2024
1 parent dae794a commit cf080b2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
10 changes: 5 additions & 5 deletions Kalevala.elm
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import Deserialize
import Debug

isRemoteSignal : Signal Bool
isRemoteSignal =
let getIsRemoteFromClickSignal event =
isRemoteSignal =
let getIsRemoteFromClickSignal event =
case event of
StartSinglePlayer -> Just False
StartTwoPlayerHotseat -> Just False
Expand Down Expand Up @@ -92,10 +92,10 @@ processClick signal =
in
constructAction <~ signal ~ seedSignal ~ sampledMouse ~ Window.dimensions ~ sampledPlayerName

{- Path to a Voluspa game server
{- Path to a Voluspa game server
(see https://github.com/neunenak/voluspa-server) -}
server : String
server = "ws://ec2-52-10-22-64.us-west-2.compute.amazonaws.com:22000"
server = "ws://209.38.174.55:22000"

{- Encodes an Action as a JSON string -}
encode : Action -> String
Expand Down Expand Up @@ -126,7 +126,7 @@ getCpuResponse playerAction delayTime =
in
Time.delay delayTime (processCpuResponse <~ playerAction)

{- The main game loop.
{- The main game loop.
The state is folded over time over a stream of Actions, coming from the client and from the server (for an online game.)
Actions from the client are constructed by processing a signal of ClickEvents from clickMailbox.
In the case the the game type is HumanVsHumanRemote, Actions are also sent to the server over a websocket,
Expand Down
2 changes: 1 addition & 1 deletion elm-stuff/build-artifacts/USER/PROJECT/1.0.0/Kalevala.elmo
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Elm.Kalevala.make = function (_elm) {
0,
$Serialize.action(action));
};
var server = "ws://ec2-52-10-22-64.us-west-2.compute.amazonaws.com:22000";
var server = "wss://ec2-52-10-22-64.us-west-2.compute.amazonaws.com:22000";
var constructAction = F5(function (clickType,
seed,
mousePos,
Expand Down
24 changes: 12 additions & 12 deletions elm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6692,7 +6692,7 @@ Elm.Kalevala.make = function (_elm) {
0,
$Serialize.action(action));
};
var server = "ws://ec2-52-10-22-64.us-west-2.compute.amazonaws.com:22000";
var server = "ws://209.38.174.55:22000";
var constructAction = F5(function (clickType,
seed,
mousePos,
Expand Down Expand Up @@ -14685,7 +14685,7 @@ var commonEvents = [
Only one DOMDelegator should exist because we do not want
duplicate event listeners bound to the DOM.

`Delegator` will also `listenTo()` all events unless
`Delegator` will also `listenTo()` all events unless
every caller opts out of it
*/
module.exports = Delegator
Expand Down Expand Up @@ -14727,7 +14727,7 @@ function Delegator(opts) {
* Safe for element IDs and server-side lookups.
*
* Extracted from CLCTR
*
*
* Copyright (c) Eric Elliott 2012
* MIT License
*/
Expand Down Expand Up @@ -14793,7 +14793,7 @@ function Delegator(opts) {

counter = safeCounter().toString(36).slice(-4);

return date.slice(-2) +
return date.slice(-2) +
counter + print + random;
};

Expand Down Expand Up @@ -15884,11 +15884,11 @@ function renderThunk(thunk, previous) {
}

},{"./is-thunk":28,"./is-vnode":30,"./is-vtext":31,"./is-widget":32}],28:[function(require,module,exports){
module.exports = isThunk
function isThunk(t) {
return t && t.type === "Thunk"
}
module.exports = isThunk

function isThunk(t) {
return t && t.type === "Thunk"
}

},{}],29:[function(require,module,exports){
module.exports = isHook
Expand Down Expand Up @@ -16362,7 +16362,7 @@ Elm.Native.WebSocket.make = function(elm) {

var pending = [];
var ready = false;

ws.onopen = function(e) {
var len = pending.length;
for (var i = 0; i < len; ++i) { ws.send(pending[i]); }
Expand All @@ -16371,11 +16371,11 @@ Elm.Native.WebSocket.make = function(elm) {
ws.onmessage = function(event) {
elm.notify(incoming.id, event.data);
};

function send(msg) {
ready ? ws.send(msg) : pending.push(msg);
}

function take1(x,y) { return x }
return A3(Signal.map2, F2(take1), incoming, A2(Signal.map, send, outgoing));
}
Expand Down

0 comments on commit cf080b2

Please sign in to comment.