@@ -8,8 +8,8 @@ After(async function (this: World) {
88 this . players . clear ( )
99} )
1010
11- async function playerIsConnectedAndReadyForGame ( this : World , playerName : string , peerID : string , gameID : string , lat ?: number , lon ?: number ) : Promise < void > {
12- const player = await this . createPlayer ( playerName , gameID , lat , lon )
11+ async function playerIsConnectedAndReadyForGame ( this : World , playerName : string , peerID : string , gameID : string ) : Promise < void > {
12+ const player = await this . createPlayer ( playerName , gameID )
1313 const event = await player . waitForEvent ( 'ready' )
1414 if ( event == null ) {
1515 throw new Error ( `unable to add player ${ playerName } to network` )
@@ -23,10 +23,6 @@ Given('{string} is connected as {string} and ready for game {string}', async fun
2323 await playerIsConnectedAndReadyForGame . call ( this , playerName , peerID , gameID )
2424} )
2525
26- Given ( '{string} is connected as {string} with lat,lon as {float},{float} and ready for game {string}' , async function ( this : World , playerName : string , peerID : string , lat : number , lon : number , gameID : string ) {
27- await playerIsConnectedAndReadyForGame . call ( this , playerName , peerID , gameID , lat , lon )
28- } )
29-
3026async function areJoinedInALobby ( this : World , playerNamesRaw : string , publc : boolean ) : Promise < void > {
3127 const playerNames = playerNamesRaw . split ( ',' ) . map ( s => s . trim ( ) )
3228 if ( playerNames . length < 2 ) {
@@ -158,10 +154,6 @@ Given('these peers exist:', async function (this: World, peers: DataTable) {
158154
159155 if ( value === 'null' ) {
160156 v . push ( 'NULL' )
161- } else if ( key === 'latency_vector' ) {
162- v . push ( `ARRAY[${ value . substring ( 1 , value . length - 1 ) } ]::vector(11)` )
163- } else if ( key === 'geo' ) {
164- v . push ( `ll_to_earth(${ value } )` )
165157 } else {
166158 v . push ( `'${ value } '` )
167159 }
@@ -494,16 +486,3 @@ Then('{string} failed to join the lobby', function (playerName: string) {
494486 throw new Error ( `player is in lobby ${ player . network . currentLobby as string } ` )
495487 }
496488} )
497-
498- When ( 'the next peer\'s latency vector is set to:' , function ( latencies : string ) {
499- if ( latencies === 'null' ) {
500- this . latencyVector = null
501- return
502- }
503-
504- const lv = latencies . split ( ',' ) . map ( s => parseInt ( s . trim ( ) , 10 ) )
505- if ( lv . length !== 11 ) {
506- throw new Error ( 'latency vector must have 11 elements' )
507- }
508- this . latencyVector = lv
509- } )
0 commit comments