How to use moveTo method in Webdriverio

Best JavaScript code snippet using webdriverio-monorepo

script.js

Source:script.js Github

copy

Full Screen

...7 8 function labirint(){910ctx.beginPath();11ctx.moveTo(2,2);12ctx.lineTo(226,2);1314151617181920ctx.moveTo(242,2);21ctx.lineTo(482,2);2223242526272829ctx.moveTo(18,18);30ctx.lineTo(34,18);3132333435363738ctx.moveTo(82,18);39ctx.lineTo(98,18);4041424344454647ctx.moveTo(178,18);48ctx.lineTo(242,18);4950515253545556ctx.moveTo(274,18);57ctx.lineTo(290,18);5859606162636465ctx.moveTo(322,18);66ctx.lineTo(354,18);6768697071727374ctx.moveTo(386,18);75ctx.lineTo(434,18);7677787980818283ctx.moveTo(450,18);84ctx.lineTo(466,18);8586878889909192ctx.moveTo(34,34);93ctx.lineTo(66,34);949596979899100101ctx.moveTo(98,34);102ctx.lineTo(114,34);103104105106107108109110ctx.moveTo(162,34);111ctx.lineTo(178,34);112113114115116117118119ctx.moveTo(194,34);120ctx.lineTo(210,34);121122123124125126127128ctx.moveTo(226,34);129ctx.lineTo(274,34);130131132133134135136137ctx.moveTo(306,34);138ctx.lineTo(322,34);139140141142143144145146ctx.moveTo(354,34);147ctx.lineTo(370,34);148149150151152153154155ctx.moveTo(402,34);156ctx.lineTo(418,34);157158159160161162163164ctx.moveTo(434,34);165ctx.lineTo(482,34);166167168169170171172173ctx.moveTo(18,50);174ctx.lineTo(66,50);175176177178179180181182ctx.moveTo(82,50);183ctx.lineTo(98,50);184185186187188189190191ctx.moveTo(114,50);192ctx.lineTo(162,50);193194195196197198199200ctx.moveTo(178,50);201ctx.lineTo(242,50);202203204205206207208209ctx.moveTo(274,50);210ctx.lineTo(290,50);211212213214215216217218ctx.moveTo(322,50);219ctx.lineTo(418,50);220221222223224225226227ctx.moveTo(434,50);228ctx.lineTo(450,50);229230231232233234235236ctx.moveTo(2,66);237ctx.lineTo(34,66);238239240241242243244245ctx.moveTo(82,66);246ctx.lineTo(146,66);247248249250251252253254ctx.moveTo(162,66);255ctx.lineTo(226,66);256257258259260261262263ctx.moveTo(242,66);264ctx.lineTo(274,66);265266267268269270271272ctx.moveTo(338,66);273ctx.lineTo(370,66);274275276277278279280281ctx.moveTo(386,66);282ctx.lineTo(434,66);283284285286287288289290ctx.moveTo(34,82);291ctx.lineTo(50,82);292293294295296297298299ctx.moveTo(66,82);300ctx.lineTo(82,82);301302303304305306307308ctx.moveTo(98,82);309ctx.lineTo(114,82);310311312313314315316317ctx.moveTo(130,82);318ctx.lineTo(162,82);319320321322323324325326ctx.moveTo(194,82);327ctx.lineTo(242,82);328329330331332333334335ctx.moveTo(290,82);336ctx.lineTo(354,82);337338339340341342343344ctx.moveTo(370,82);345ctx.lineTo(386,82);346347348349350351352353ctx.moveTo(450,82);354ctx.lineTo(466,82);355356357358359360361362ctx.moveTo(50,98);363ctx.lineTo(66,98);364365366367368369370371ctx.moveTo(82,98);372ctx.lineTo(98,98);373374375376377378379380ctx.moveTo(114,98);381ctx.lineTo(194,98);382383384385386387388389ctx.moveTo(210,98);390ctx.lineTo(290,98);391392393394395396397398ctx.moveTo(338,98);399ctx.lineTo(386,98);400401402403404405406407ctx.moveTo(434,98);408ctx.lineTo(482,98);409410411412413414415416ctx.moveTo(34,114);417ctx.lineTo(66,114);418419420421422423424425ctx.moveTo(82,114);426ctx.lineTo(114,114);427428429430431432433434ctx.moveTo(130,114);435ctx.lineTo(162,114);436437438439440441442443ctx.moveTo(178,114);444ctx.lineTo(210,114);445446447448449450451452ctx.moveTo(242,114);453ctx.lineTo(258,114);454455456457458459460461ctx.moveTo(290,114);462ctx.lineTo(306,114);463464465466467468469470ctx.moveTo(354,114);471ctx.lineTo(386,114);472473474475476477478479ctx.moveTo(450,114);480ctx.lineTo(466,114);481482483484485486487488ctx.moveTo(2,130);489ctx.lineTo(18,130);490491492493494495496497ctx.moveTo(66,130);498ctx.lineTo(98,130);499500501502503504505506ctx.moveTo(114,130);507ctx.lineTo(130,130);508509510511512513514515ctx.moveTo(194,130);516ctx.lineTo(226,130);517518519520521522523524ctx.moveTo(242,130);525ctx.lineTo(322,130);526527528529530531532533ctx.moveTo(338,130);534ctx.lineTo(354,130);535536537538539540541542ctx.moveTo(386,130);543ctx.lineTo(402,130);544545546547548549550551ctx.moveTo(450,130);552ctx.lineTo(466,130);553554555556557558559560ctx.moveTo(18,146);561ctx.lineTo(34,146);562563564565566567568569ctx.moveTo(50,146);570ctx.lineTo(66,146);571572573574575576577578ctx.moveTo(82,146);579ctx.lineTo(98,146);580581582583584585586587ctx.moveTo(114,146);588ctx.lineTo(162,146);589590591592593594595596ctx.moveTo(258,146);597ctx.lineTo(306,146);598599600601602603604605ctx.moveTo(322,146);606ctx.lineTo(354,146);607608609610611612613614ctx.moveTo(370,146);615ctx.lineTo(386,146);616617618619620621622623ctx.moveTo(418,146);624ctx.lineTo(450,146);625626627628629630631632ctx.moveTo(2,162);633ctx.lineTo(18,162);634635636637638639640641ctx.moveTo(34,162);642ctx.lineTo(50,162);643644645646647648649650ctx.moveTo(66,162);651ctx.lineTo(114,162);652653654655656657658659ctx.moveTo(130,162);660ctx.lineTo(146,162);661662663664665666667668ctx.moveTo(178,162);669ctx.lineTo(210,162);670671672673674675676677ctx.moveTo(226,162);678ctx.lineTo(242,162);679680681682683684685686ctx.moveTo(274,162);687ctx.lineTo(322,162);688689690691692693694695ctx.moveTo(338,162);696ctx.lineTo(354,162);697698699700701702703704ctx.moveTo(402,162);705ctx.lineTo(466,162);706707708709710711712713ctx.moveTo(82,178);714ctx.lineTo(98,178);715716717718719720721722ctx.moveTo(114,178);723ctx.lineTo(130,178);724725726727728729730731ctx.moveTo(194,178);732ctx.lineTo(226,178);733734735736737738739740ctx.moveTo(242,178);741ctx.lineTo(306,178);742743744745746747748749ctx.moveTo(322,178);750ctx.lineTo(338,178);751752753754755756757758ctx.moveTo(354,178);759ctx.lineTo(450,178);760761762763764765766767ctx.moveTo(2,194);768ctx.lineTo(18,194);769770771772773774775776ctx.moveTo(66,194);777ctx.lineTo(82,194);778779780781782783784785ctx.moveTo(98,194);786ctx.lineTo(114,194);787788789790791792793794ctx.moveTo(162,194);795ctx.lineTo(178,194);796797798799800801802803ctx.moveTo(258,194);804ctx.lineTo(274,194);805806807808809810811812ctx.moveTo(306,194);813ctx.lineTo(338,194);814815816817818819820821ctx.moveTo(354,194);822ctx.lineTo(370,194);823824825826827828829830ctx.moveTo(402,194);831ctx.lineTo(434,194);832833834835836837838839ctx.moveTo(450,194);840ctx.lineTo(482,194);841842843844845846847848ctx.moveTo(82,210);849ctx.lineTo(98,210);850851852853854855856857ctx.moveTo(114,210);858ctx.lineTo(130,210);859860861862863864865866ctx.moveTo(146,210);867ctx.lineTo(162,210);868869870871872873874875ctx.moveTo(210,210);876ctx.lineTo(274,210);877878879880881882883884ctx.moveTo(290,210);885ctx.lineTo(306,210);886887888889890891892893ctx.moveTo(370,210);894ctx.lineTo(402,210);895896897898899900901902ctx.moveTo(434,210);903ctx.lineTo(450,210);904905906907908909910911ctx.moveTo(34,226);912ctx.lineTo(82,226);913914915916917918919920ctx.moveTo(98,226);921ctx.lineTo(130,226);922923924925926927928929ctx.moveTo(162,226);930ctx.lineTo(178,226);931932933934935936937938ctx.moveTo(258,226);939ctx.lineTo(290,226);940941942943944945946947ctx.moveTo(306,226);948ctx.lineTo(370,226);949950951952953954955956ctx.moveTo(402,226);957ctx.lineTo(466,226);958959960961962963964965ctx.moveTo(34,242);966ctx.lineTo(82,242);967968969970971972973974ctx.moveTo(146,242);975ctx.lineTo(162,242);976977978979980981982983ctx.moveTo(178,242);984ctx.lineTo(210,242);985986987988989990991992ctx.moveTo(226,242);993ctx.lineTo(274,242);99499599699799899910001001ctx.moveTo(290,242);1002ctx.lineTo(306,242);10031004100510061007100810091010ctx.moveTo(338,242);1011ctx.lineTo(418,242);10121013101410151016101710181019ctx.moveTo(450,242);1020ctx.lineTo(482,242);10211022102310241025102610271028ctx.moveTo(50,258);1029ctx.lineTo(66,258);10301031103210331034103510361037ctx.moveTo(82,258);1038ctx.lineTo(98,258);10391040104110421043104410451046ctx.moveTo(130,258);1047ctx.lineTo(146,258);10481049105010511052105310541055ctx.moveTo(162,258);1056ctx.lineTo(178,258);10571058105910601061106210631064ctx.moveTo(194,258);1065ctx.lineTo(242,258);10661067106810691070107110721073ctx.moveTo(258,258);1074ctx.lineTo(322,258);10751076107710781079108010811082ctx.moveTo(386,258);1083ctx.lineTo(402,258);10841085108610871088108910901091ctx.moveTo(418,258);1092ctx.lineTo(434,258);10931094109510961097109810991100ctx.moveTo(450,258);1101ctx.lineTo(466,258);11021103110411051106110711081109ctx.moveTo(2,274);1110ctx.lineTo(34,274);11111112111311141115111611171118ctx.moveTo(50,274);1119ctx.lineTo(66,274);11201121112211231124112511261127ctx.moveTo(130,274);1128ctx.lineTo(162,274);11291130113111321133113411351136ctx.moveTo(210,274);1137ctx.lineTo(242,274);11381139114011411142114311441145ctx.moveTo(274,274);1146ctx.lineTo(290,274);11471148114911501151115211531154ctx.moveTo(322,274);1155ctx.lineTo(338,274);11561157115811591160116111621163ctx.moveTo(386,274);1164ctx.lineTo(418,274);11651166116711681169117011711172ctx.moveTo(434,274);1173ctx.lineTo(450,274);11741175117611771178117911801181ctx.moveTo(34,290);1182ctx.lineTo(50,290);11831184118511861187118811891190ctx.moveTo(82,290);1191ctx.lineTo(178,290);11921193119411951196119711981199ctx.moveTo(194,290);1200ctx.lineTo(226,290);12011202120312041205120612071208ctx.moveTo(258,290);1209ctx.lineTo(274,290);12101211121212131214121512161217ctx.moveTo(370,290);1218ctx.lineTo(386,290);12191220122112221223122412251226ctx.moveTo(402,290);1227ctx.lineTo(466,290);12281229123012311232123312341235ctx.moveTo(2,306);1236ctx.lineTo(18,306);12371238123912401241124212431244ctx.moveTo(34,306);1245ctx.lineTo(130,306);12461247124812491250125112521253ctx.moveTo(146,306);1254ctx.lineTo(162,306);12551256125712581259126012611262ctx.moveTo(178,306);1263ctx.lineTo(194,306);12641265126612671268126912701271ctx.moveTo(210,306);1272ctx.lineTo(258,306);12731274127512761277127812791280ctx.moveTo(274,306);1281ctx.lineTo(290,306);12821283128412851286128712881289ctx.moveTo(322,306);1290ctx.lineTo(338,306);12911292129312941295129612971298ctx.moveTo(370,306);1299ctx.lineTo(418,306);13001301130213031304130513061307ctx.moveTo(450,306);1308ctx.lineTo(482,306);13091310131113121313131413151316ctx.moveTo(18,322);1317ctx.lineTo(34,322);13181319132013211322132313241325ctx.moveTo(82,322);1326ctx.lineTo(98,322);13271328132913301331133213331334ctx.moveTo(130,322);1335ctx.lineTo(146,322);13361337133813391340134113421343ctx.moveTo(178,322);1344ctx.lineTo(194,322);13451346134713481349135013511352ctx.moveTo(258,322);1353ctx.lineTo(274,322);13541355135613571358135913601361ctx.moveTo(306,322);1362ctx.lineTo(322,322);13631364136513661367136813691370ctx.moveTo(386,322);1371ctx.lineTo(402,322);13721373137413751376137713781379ctx.moveTo(434,322);1380ctx.lineTo(466,322);13811382138313841385138613871388ctx.moveTo(50,338);1389ctx.lineTo(66,338);13901391139213931394139513961397ctx.moveTo(114,338);1398ctx.lineTo(130,338);13991400140114021403140414051406ctx.moveTo(162,338);1407ctx.lineTo(226,338);14081409141014111412141314141415ctx.moveTo(242,338);1416ctx.lineTo(258,338);14171418141914201421142214231424ctx.moveTo(274,338);1425ctx.lineTo(322,338);14261427142814291430143114321433ctx.moveTo(402,338);1434ctx.lineTo(418,338);14351436143714381439144014411442ctx.moveTo(450,338);1443ctx.lineTo(466,338);14441445144614471448144914501451ctx.moveTo(18,354);1452ctx.lineTo(34,354);14531454145514561457145814591460ctx.moveTo(66,354);1461ctx.lineTo(82,354);14621463146414651466146714681469ctx.moveTo(98,354);1470ctx.lineTo(114,354);14711472147314741475147614771478ctx.moveTo(306,354);1479ctx.lineTo(338,354);14801481148214831484148514861487ctx.moveTo(354,354);1488ctx.lineTo(386,354);14891490149114921493149414951496ctx.moveTo(418,354);1497ctx.lineTo(434,354);14981499150015011502150315041505ctx.moveTo(34,370);1506ctx.lineTo(50,370);15071508150915101511151215131514ctx.moveTo(114,370);1515ctx.lineTo(162,370);15161517151815191520152115221523ctx.moveTo(194,370);1524ctx.lineTo(226,370);15251526152715281529153015311532ctx.moveTo(290,370);1533ctx.lineTo(306,370);15341535153615371538153915401541ctx.moveTo(338,370);1542ctx.lineTo(354,370);15431544154515461547154815491550ctx.moveTo(386,370);1551ctx.lineTo(402,370);15521553155415551556155715581559ctx.moveTo(434,370);1560ctx.lineTo(450,370);15611562156315641565156615671568ctx.moveTo(466,370);1569ctx.lineTo(482,370);15701571157215731574157515761577ctx.moveTo(2,386);1578ctx.lineTo(34,386);15791580158115821583158415851586ctx.moveTo(130,386);1587ctx.lineTo(146,386);15881589159015911592159315941595ctx.moveTo(162,386);1596ctx.lineTo(178,386);15971598159916001601160216031604ctx.moveTo(210,386);1605ctx.lineTo(226,386);16061607160816091610161116121613ctx.moveTo(242,386);1614ctx.lineTo(322,386);16151616161716181619162016211622ctx.moveTo(402,386);1623ctx.lineTo(418,386);16241625162616271628162916301631ctx.moveTo(450,386);1632ctx.lineTo(466,386);16331634163516361637163816391640ctx.moveTo(18,402);1641ctx.lineTo(34,402);16421643164416451646164716481649ctx.moveTo(114,402);1650ctx.lineTo(130,402);16511652165316541655165616571658ctx.moveTo(146,402);1659ctx.lineTo(162,402);16601661166216631664166516661667ctx.moveTo(370,402);1668ctx.lineTo(418,402);16691670167116721673167416751676ctx.moveTo(434,402);1677ctx.lineTo(466,402);16781679168016811682168316841685ctx.moveTo(2,418);1686ctx.lineTo(18,418);16871688168916901691169216931694ctx.moveTo(50,418);1695ctx.lineTo(82,418);16961697169816991700170117021703ctx.moveTo(98,418);1704ctx.lineTo(146,418);17051706170717081709171017111712ctx.moveTo(210,418);1713ctx.lineTo(258,418);17141715171617171718171917201721ctx.moveTo(274,418);1722ctx.lineTo(402,418);17231724172517261727172817291730ctx.moveTo(418,418);1731ctx.lineTo(434,418);17321733173417351736173717381739ctx.moveTo(450,418);1740ctx.lineTo(482,418);17411742174317441745174617471748ctx.moveTo(18,434);1749ctx.lineTo(50,434);17501751175217531754175517561757ctx.moveTo(178,434);1758ctx.lineTo(210,434);17591760176117621763176417651766ctx.moveTo(226,434);1767ctx.lineTo(274,434);17681769177017711772177317741775ctx.moveTo(322,434);1776ctx.lineTo(354,434);17771778177917801781178217831784ctx.moveTo(386,434);1785ctx.lineTo(466,434);17861787178817891790179117921793ctx.moveTo(2,450);1794ctx.lineTo(18,450);17951796179717981799180018011802ctx.moveTo(50,450);1803ctx.lineTo(130,450);18041805180618071808180918101811ctx.moveTo(162,450);1812ctx.lineTo(194,450);18131814181518161817181818191820ctx.moveTo(306,450);1821ctx.lineTo(322,450);18221823182418251826182718281829ctx.moveTo(338,450);1830ctx.lineTo(370,450);18311832183318341835183618371838ctx.moveTo(434,450);1839ctx.lineTo(482,450);18401841184218431844184518461847ctx.moveTo(98,466);1848ctx.lineTo(114,466);18491850185118521853185418551856ctx.moveTo(130,466);1857ctx.lineTo(146,466);18581859186018611862186318641865ctx.moveTo(194,466);1866ctx.lineTo(258,466);18671868186918701871187218731874ctx.moveTo(274,466);1875ctx.lineTo(306,466);18761877187818791880188118821883ctx.moveTo(354,466);1884ctx.lineTo(402,466);18851886188718881889189018911892ctx.moveTo(2,482);1893ctx.lineTo(242,482);18941895189618971898189919001901ctx.moveTo(258,482);1902ctx.lineTo(482,482);19031904190519061907190819091910ctx.moveTo(2,2);1911ctx.lineTo(2,482);19121913191419151916191719181919ctx.moveTo(18,18);1920ctx.lineTo(18,50);19211922192319241925192619271928ctx.moveTo(18,66);1929ctx.lineTo(18,98);19301931193219331934193519361937ctx.moveTo(18,114);1938ctx.lineTo(18,130);19391940194119421943194419451946ctx.moveTo(18,162);1947ctx.lineTo(18,178);19481949195019511952195319541955ctx.moveTo(18,194);1956ctx.lineTo(18,258);19571958195919601961196219631964ctx.moveTo(18,290);1965ctx.lineTo(18,306);19661967196819691970197119721973ctx.moveTo(18,338);1974ctx.lineTo(18,370);19751976197719781979198019811982ctx.moveTo(18,418);1983ctx.lineTo(18,434);19841985198619871988198919901991ctx.moveTo(18,466);1992ctx.lineTo(18,482);19931994199519961997199819992000ctx.moveTo(34,82);2001ctx.lineTo(34,210);20022003200420052006200720082009ctx.moveTo(34,242);2010ctx.lineTo(34,290);20112012201320142015201620172018ctx.moveTo(34,306);2019ctx.lineTo(34,354);20202021202220232024202520262027ctx.moveTo(34,370);2028ctx.lineTo(34,418);20292030203120322033203420352036ctx.moveTo(34,434);2037ctx.lineTo(34,466);20382039204020412042204320442045ctx.moveTo(50,2);2046ctx.lineTo(50,18);20472048204920502051205220532054ctx.moveTo(50,50);2055ctx.lineTo(50,82);20562057205820592060206120622063ctx.moveTo(50,130);2064ctx.lineTo(50,146);20652066206720682069207020712072ctx.moveTo(50,162);2073ctx.lineTo(50,226);20742075207620772078207920802081ctx.moveTo(50,274);2082ctx.lineTo(50,290);20832084208520862087208820892090ctx.moveTo(50,322);2091ctx.lineTo(50,338);20922093209420952096209720982099ctx.moveTo(50,354);2100ctx.lineTo(50,402);21012102210321042105210621072108ctx.moveTo(50,418);2109ctx.lineTo(50,434);21102111211221132114211521162117ctx.moveTo(50,450);2118ctx.lineTo(50,466);21192120212121222123212421252126ctx.moveTo(66,2);2127ctx.lineTo(66,34);21282129213021312132213321342135ctx.moveTo(66,50);2136ctx.lineTo(66,98);21372138213921402141214221432144ctx.moveTo(66,114);2145ctx.lineTo(66,130);21462147214821492150215121522153ctx.moveTo(66,146);2154ctx.lineTo(66,210);21552156215721582159216021612162ctx.moveTo(66,258);2163ctx.lineTo(66,274);21642165216621672168216921702171ctx.moveTo(66,290);2172ctx.lineTo(66,338);21732174217521762177217821792180ctx.moveTo(66,354);2181ctx.lineTo(66,402);21822183218421852186218721882189ctx.moveTo(66,434);2190ctx.lineTo(66,450);21912192219321942195219621972198ctx.moveTo(66,466);2199ctx.lineTo(66,482);22002201220222032204220522062207ctx.moveTo(82,34);2208ctx.lineTo(82,50);22092210221122122213221422152216ctx.moveTo(82,66);2217ctx.lineTo(82,82);22182219222022212222222322242225ctx.moveTo(82,98);2226ctx.lineTo(82,114);22272228222922302231223222332234ctx.moveTo(82,130);2235ctx.lineTo(82,146);22362237223822392240224122422243ctx.moveTo(82,210);2244ctx.lineTo(82,258);22452246224722482249225022512252ctx.moveTo(82,274);2253ctx.lineTo(82,290);22542255225622572258225922602261ctx.moveTo(82,322);2262ctx.lineTo(82,354);22632264226522662267226822692270ctx.moveTo(82,370);2271ctx.lineTo(82,434);22722273227422752276227722782279ctx.moveTo(82,450);2280ctx.lineTo(82,466);22812282228322842285228622872288ctx.moveTo(98,18);2289ctx.lineTo(98,34);22902291229222932294229522962297ctx.moveTo(98,50);2298ctx.lineTo(98,66);22992300230123022303230423052306ctx.moveTo(98,178);2307ctx.lineTo(98,210);23082309231023112312231323142315ctx.moveTo(98,226);2316ctx.lineTo(98,274);23172318231923202321232223232324ctx.moveTo(98,322);2325ctx.lineTo(98,450);23262327232823292330233123322333ctx.moveTo(98,466);2334ctx.lineTo(98,482);23352336233723382339234023412342ctx.moveTo(114,2);2343ctx.lineTo(114,18);23442345234623472348234923502351ctx.moveTo(114,34);2352ctx.lineTo(114,50);23532354235523562357235823592360ctx.moveTo(114,82);2361ctx.lineTo(114,114);23622363236423652366236723682369ctx.moveTo(114,146);2370ctx.lineTo(114,178);23712372237323742375237623772378ctx.moveTo(114,242);2379ctx.lineTo(114,290);23802381238223832384238523862387ctx.moveTo(114,306);2388ctx.lineTo(114,338);23892390239123922393239423952396ctx.moveTo(114,370);2397ctx.lineTo(114,402);23982399240024012402240324042405ctx.moveTo(114,418);2406ctx.lineTo(114,434);24072408240924102411241224132414ctx.moveTo(130,2);2415ctx.lineTo(130,34);24162417241824192420242124222423ctx.moveTo(130,66);2424ctx.lineTo(130,82);24252426242724282429243024312432ctx.moveTo(130,114);2433ctx.lineTo(130,130);24342435243624372438243924402441ctx.moveTo(130,178);2442ctx.lineTo(130,274);24432444244524462447244824492450ctx.moveTo(130,306);2451ctx.lineTo(130,322);24522453245424552456245724582459ctx.moveTo(130,338);2460ctx.lineTo(130,370);24612462246324642465246624672468ctx.moveTo(130,434);2469ctx.lineTo(130,466);24702471247224732474247524762477ctx.moveTo(146,18);2478ctx.lineTo(146,50);24792480248124822483248424852486ctx.moveTo(146,130);2487ctx.lineTo(146,146);24882489249024912492249324942495ctx.moveTo(146,162);2496ctx.lineTo(146,210);24972498249925002501250225032504ctx.moveTo(146,226);2505ctx.lineTo(146,242);25062507250825092510251125122513ctx.moveTo(146,290);2514ctx.lineTo(146,306);25152516251725182519252025212522ctx.moveTo(146,322);2523ctx.lineTo(146,354);25242525252625272528252925302531ctx.moveTo(146,386);2532ctx.lineTo(146,418);25332534253525362537253825392540ctx.moveTo(146,434);2541ctx.lineTo(146,466);25422543254425452546254725482549ctx.moveTo(162,2);2550ctx.lineTo(162,34);25512552255325542555255625572558ctx.moveTo(162,50);2559ctx.lineTo(162,66);25602561256225632564256525662567ctx.moveTo(162,98);2568ctx.lineTo(162,194);25692570257125722573257425752576ctx.moveTo(162,210);2577ctx.lineTo(162,226);25782579258025812582258325842585ctx.moveTo(162,242);2586ctx.lineTo(162,258);25872588258925902591259225932594ctx.moveTo(162,306);2595ctx.lineTo(162,386);25962597259825992600260126022603ctx.moveTo(162,402);2604ctx.lineTo(162,466);26052606260726082609261026112612ctx.moveTo(178,34);2613ctx.lineTo(178,50);26142615261626172618261926202621ctx.moveTo(178,66);2622ctx.lineTo(178,98);26232624262526262627262826292630ctx.moveTo(178,114);2631ctx.lineTo(178,162);26322633263426352636263726382639ctx.moveTo(178,178);2640ctx.lineTo(178,210);26412642264326442645264626472648ctx.moveTo(178,226);2649ctx.lineTo(178,290);26502651265226532654265526562657ctx.moveTo(178,306);2658ctx.lineTo(178,322);26592660266126622663266426652666ctx.moveTo(178,338);2667ctx.lineTo(178,370);26682669267026712672267326742675ctx.moveTo(178,386);2676ctx.lineTo(178,434);26772678267926802681268226832684ctx.moveTo(178,450);2685ctx.lineTo(178,482);26862687268826892690269126922693ctx.moveTo(194,130);2694ctx.lineTo(194,146);26952696269726982699270027012702ctx.moveTo(194,162);2703ctx.lineTo(194,226);27042705270627072708270927102711ctx.moveTo(194,258);2712ctx.lineTo(194,274);27132714271527162717271827192720ctx.moveTo(194,290);2721ctx.lineTo(194,306);27222723272427252726272727282729ctx.moveTo(194,354);2730ctx.lineTo(194,434);27312732273327342735273627372738ctx.moveTo(210,18);2739ctx.lineTo(210,34);27402741274227432744274527462747ctx.moveTo(210,82);2748ctx.lineTo(210,98);27492750275127522753275427552756ctx.moveTo(210,114);2757ctx.lineTo(210,130);27582759276027612762276327642765ctx.moveTo(210,146);2766ctx.lineTo(210,162);27672768276927702771277227732774ctx.moveTo(210,194);2775ctx.lineTo(210,258);27762777277827792780278127822783ctx.moveTo(210,306);2784ctx.lineTo(210,354);27852786278727882789279027912792ctx.moveTo(210,402);2793ctx.lineTo(210,418);27942795279627972798279928002801ctx.moveTo(210,434);2802ctx.lineTo(210,466);28032804280528062807280828092810ctx.moveTo(226,98);2811ctx.lineTo(226,114);28122813281428152816281728182819ctx.moveTo(226,130);2820ctx.lineTo(226,146);28212822282328242825282628272828ctx.moveTo(226,162);2829ctx.lineTo(226,194);28302831283228332834283528362837ctx.moveTo(226,226);2838ctx.lineTo(226,242);28392840284128422843284428452846ctx.moveTo(226,274);2847ctx.lineTo(226,290);28482849285028512852285328542855ctx.moveTo(226,322);2856ctx.lineTo(226,338);28572858285928602861286228632864ctx.moveTo(226,354);2865ctx.lineTo(226,418);28662867286828692870287128722873ctx.moveTo(226,450);2874ctx.lineTo(226,466);28752876287728782879288028812882ctx.moveTo(242,2);2883ctx.lineTo(242,18);28842885288628872888288928902891ctx.moveTo(242,66);2892ctx.lineTo(242,82);28932894289528962897289828992900ctx.moveTo(242,114);2901ctx.lineTo(242,162);29022903290429052906290729082909ctx.moveTo(242,178);2910ctx.lineTo(242,226);29112912291329142915291629172918ctx.moveTo(242,258);2919ctx.lineTo(242,274);29202921292229232924292529262927ctx.moveTo(242,290);2928ctx.lineTo(242,306);29292930293129322933293429352936ctx.moveTo(242,322);2937ctx.lineTo(242,402);29382939294029412942294329442945ctx.moveTo(242,434);2946ctx.lineTo(242,450);29472948294929502951295229532954ctx.moveTo(258,18);2955ctx.lineTo(258,66);29562957295829592960296129622963ctx.moveTo(258,82);2964ctx.lineTo(258,98);29652966296729682969297029712972ctx.moveTo(258,146);2973ctx.lineTo(258,178);29742975297629772978297929802981ctx.moveTo(258,258);2982ctx.lineTo(258,290);29832984298529862987298829892990ctx.moveTo(258,306);2991ctx.lineTo(258,322);29922993299429952996299729982999ctx.moveTo(258,338);3000ctx.lineTo(258,370);30013002300330043005300630073008ctx.moveTo(258,402);3009ctx.lineTo(258,434);30103011301230133014301530163017ctx.moveTo(258,450);3018ctx.lineTo(258,482);30193020302130223023302430253026ctx.moveTo(274,66);3027ctx.lineTo(274,82);30283029303030313032303330343035ctx.moveTo(274,98);3036ctx.lineTo(274,130);30373038303930403041304230433044ctx.moveTo(274,194);3045ctx.lineTo(274,210);30463047304830493050305130523053ctx.moveTo(274,242);3054ctx.lineTo(274,258);30553056305730583059306030613062ctx.moveTo(274,274);3063ctx.lineTo(274,306);30643065306630673068306930703071ctx.moveTo(274,338);3072ctx.lineTo(274,402);30733074307530763077307830793080ctx.moveTo(274,434);3081ctx.lineTo(274,466);30823083308430853086308730883089ctx.moveTo(290,18);3090ctx.lineTo(290,98);30913092309330943095309630973098ctx.moveTo(290,194);3099ctx.lineTo(290,242);31003101310231033104310531063107ctx.moveTo(290,290);3108ctx.lineTo(290,338);31093110311131123113311431153116ctx.moveTo(290,354);3117ctx.lineTo(290,370);31183119312031213122312331243125ctx.moveTo(290,402);3126ctx.lineTo(290,450);31273128312931303131313231333134ctx.moveTo(306,2);3135ctx.lineTo(306,66);31363137313831393140314131423143ctx.moveTo(306,82);3144ctx.lineTo(306,114);31453146314731483149315031513152ctx.moveTo(306,178);3153ctx.lineTo(306,210);31543155315631573158315931603161ctx.moveTo(306,274);3162ctx.lineTo(306,322);31633164316531663167316831693170ctx.moveTo(306,370);3171ctx.lineTo(306,386);31723173317431753176317731783179ctx.moveTo(306,402);3180ctx.lineTo(306,418);31813182318331843185318631873188ctx.moveTo(306,434);3189ctx.lineTo(306,466);31903191319231933194319531963197ctx.moveTo(322,50);3198ctx.lineTo(322,82);31993200320132023203320432053206ctx.moveTo(322,98);3207ctx.lineTo(322,146);32083209321032113212321332143215ctx.moveTo(322,162);3216ctx.lineTo(322,178);32173218321932203221322232233224ctx.moveTo(322,210);3225ctx.lineTo(322,306);32263227322832293230323132323233ctx.moveTo(322,322);3234ctx.lineTo(322,338);32353236323732383239324032413242ctx.moveTo(322,354);3243ctx.lineTo(322,370);32443245324632473248324932503251ctx.moveTo(322,386);3252ctx.lineTo(322,402);32533254325532563257325832593260ctx.moveTo(322,434);3261ctx.lineTo(322,450);32623263326432653266326732683269ctx.moveTo(322,466);3270ctx.lineTo(322,482);32713272327332743275327632773278ctx.moveTo(338,18);3279ctx.lineTo(338,50);32803281328232833284328532863287ctx.moveTo(338,82);3288ctx.lineTo(338,130);32893290329132923293329432953296ctx.moveTo(338,146);3297ctx.lineTo(338,162);32983299330033013302330333043305ctx.moveTo(338,178);3306ctx.lineTo(338,210);33073308330933103311331233133314ctx.moveTo(338,258);3315ctx.lineTo(338,274);33163317331833193320332133223323ctx.moveTo(338,290);3324ctx.lineTo(338,354);33253326332733283329333033313332ctx.moveTo(338,370);3333ctx.lineTo(338,402);33343335333633373338333933403341ctx.moveTo(338,450);3342ctx.lineTo(338,482);33433344334533463347334833493350ctx.moveTo(354,162);3351ctx.lineTo(354,226);33523353335433553356335733583359ctx.moveTo(354,242);3360ctx.lineTo(354,370);33613362336333643365336633673368ctx.moveTo(354,386);3369ctx.lineTo(354,418);33703371337233733374337533763377ctx.moveTo(370,2);3378ctx.lineTo(370,34);33793380338133823383338433853386ctx.moveTo(370,66);3387ctx.lineTo(370,82);33883389339033913392339333943395ctx.moveTo(370,114);3396ctx.lineTo(370,162);33973398339934003401340234033404ctx.moveTo(370,258);3405ctx.lineTo(370,290);34063407340834093410341134123413ctx.moveTo(370,306);3414ctx.lineTo(370,338);34153416341734183419342034213422ctx.moveTo(370,354);3423ctx.lineTo(370,402);34243425342634273428342934303431ctx.moveTo(370,418);3432ctx.lineTo(370,450);34333434343534363437343834393440ctx.moveTo(386,18);3441ctx.lineTo(386,50);34423443344434453446344734483449ctx.moveTo(386,66);3450ctx.lineTo(386,82);34513452345334543455345634573458ctx.moveTo(386,146);3459ctx.lineTo(386,242);34603461346234633464346534663467ctx.moveTo(386,258);3468ctx.lineTo(386,290);34693470347134723473347434753476ctx.moveTo(386,322);3477ctx.lineTo(386,354);34783479348034813482348334843485ctx.moveTo(386,370);3486ctx.lineTo(386,402);34873488348934903491349234933494ctx.moveTo(386,450);3495ctx.lineTo(386,466);34963497349834993500350135023503ctx.moveTo(402,82);3504ctx.lineTo(402,162);35053506350735083509351035113512ctx.moveTo(402,290);3513ctx.lineTo(402,306);35143515351635173518351935203521ctx.moveTo(402,354);3522ctx.lineTo(402,370);35233524352535263527352835293530ctx.moveTo(402,434);3531ctx.lineTo(402,466);35323533353435353536353735383539ctx.moveTo(418,34);3540ctx.lineTo(418,50);35413542354335443545354635473548ctx.moveTo(418,66);3549ctx.lineTo(418,146);35503551355235533554355535563557ctx.moveTo(418,194);3558ctx.lineTo(418,226);35593560356135623563356435653566ctx.moveTo(418,258);3567ctx.lineTo(418,274);35683569357035713572357335743575ctx.moveTo(418,306);3576ctx.lineTo(418,338);35773578357935803581358235833584ctx.moveTo(418,354);3585ctx.lineTo(418,434);35863587358835893590359135923593ctx.moveTo(418,450);3594ctx.lineTo(418,482);35953596ctx.moveTo(434,18);3597ctx.lineTo(434,34);35983599ctx.moveTo(434,50);3600ctx.lineTo(434,66);36013602ctx.moveTo(434,82);3603ctx.lineTo(434,146);36043605ctx.moveTo(434,178);3606ctx.lineTo(434,194);36073608ctx.moveTo(434,226);3609ctx.lineTo(434,258);36103611ctx.moveTo(434,290);3612ctx.lineTo(434,354);36133614ctx.moveTo(434,370);3615ctx.lineTo(434,402);36163617ctx.moveTo(434,450);3618ctx.lineTo(434,466);36193620ctx.moveTo(450,2);3621ctx.lineTo(450,18);36223623ctx.moveTo(450,50);3624ctx.lineTo(450,82);36253626ctx.moveTo(450,114);3627ctx.lineTo(450,130);36283629ctx.moveTo(450,194);3630ctx.lineTo(450,210);36313632ctx.moveTo(450,242);3633ctx.lineTo(450,274);36343635ctx.moveTo(450,338);3636ctx.lineTo(450,354);36373638ctx.moveTo(450,370);3639ctx.lineTo(450,386);36403641ctx.moveTo(450,402);3642ctx.lineTo(450,418);36433644ctx.moveTo(450,466);3645ctx.lineTo(450,482);36463647ctx.moveTo(466,50);3648ctx.lineTo(466,82);36493650ctx.moveTo(466,130);3651ctx.lineTo(466,194);36523653ctx.moveTo(466,210);3654ctx.lineTo(466,226);36553656ctx.moveTo(466,274);3657ctx.lineTo(466,290);36583659ctx.moveTo(466,322);3660ctx.lineTo(466,338);36613662ctx.moveTo(466,354);3663ctx.lineTo(466,370);36643665ctx.moveTo(466,450);3666ctx.lineTo(466,466);36673668ctx.moveTo(482,2);3669ctx.lineTo(482,482);3670ctx.stroke();367136723673367436753676}3677 ...

Full Screen

Full Screen

forces.js

Source:forces.js Github

copy

Full Screen

1import { getAreaIdList } from './areas.js'2export const forces = {3 "1942": {4 "JA": {5 "air": {6 "types": {7 "A6M": { "cost": 1, "aa": [8, 4], "saa": [4, 2], "aship": null, "asurf": null },8 "B5N": { "cost": 2, "aa": null, "saa": null, "aship": [6, 3], "asurf": [2, 1] },9 "D3A": { "cost": 2, "aa": null, "saa": null, "aship": [4, 2], "asurf": [4, 2] },10 "KI27": { "cost": 1, "aa": [4, 2], "saa": [2, 1], "aship": null, "asurf": null },11 "KI43": { "cost": 1, "aa": [6, 3] , "saa": [3, 2], "aship": null, "asurf": null },12 "KI21": { "cost": 2, "aa": null, "saa": null, "aship": [2, 1], "asurf": [6, 3] },13 "KI48": { "cost": 2, "aa": null, "saa": null, "aship": [2, 1], "asurf": [4, 2] },14 "G3M": { "cost": 2, "aa": null, "saa": null, "aship": [2, 1], "asurf": [4, 2] },15 "G4M": { "cost": 2, "aa": null, "saa": null, "aship": [4, 2], "asurf": [4, 2] },16 "A6M-G4M": { "cost": 3, "aa": [6, 3] , "saa": [3, 2], "aship": [4, 2], "asurf": [4, 2] },17 "A6M-G3M": { "cost": 3, "aa": [6, 3], "saa": [3, 2], "aship": [2, 1], "asurf": [4, 2] } 18 },19 "units": {20 "3 Kokutai": { "type": "A6M", "loc": "PH", "hp": 2, "moveTo": "" },21 "6 Kokutai": { "type": "A6M", "loc": "RE", "hp": 2, "moveTo": "" },22 "Tainan Kokutai": { "type": "A6M", "loc": "NG", "hp": 2, "moveTo": "" },23 "Yamada Kokutai": { "type": "A6M", "loc": "PH", "hp": 2, "moveTo": "" },24 "Chitose Kokutai": { "type": "A6M-G4M", "loc": "EA", "hp": 2, "moveTo": "" },25 "24 Sentai": { "type": "KI27", "loc": "PH", "hp": 2, "moveTo": "" },26 "59 Sentai": { "type": "KI43", "loc": "NG", "hp": 2, "moveTo": "" },27 "248 Sentai": { "type": "KI43", "loc": "RE", "hp": 2, "moveTo": "" },28 "14 Sentai": { "type": "KI21", "loc": "PH", "hp": 2, "moveTo": "" },29 "60 Sentai": { "type": "KI21", "loc": "RE", "hp": 2, "moveTo": "" },30 "8 Sentai": { "type": "KI48", "loc": "NG", "hp": 2, "moveTo": "" },31 "Mihoro Kokutai": { "type": "G3M", "loc": "PH", "hp": 2, "moveTo": "" },32 "4 Kokutai": { "type": "G4M", "loc": "NG", "hp": 2, "moveTo": "" },33 "751 Kokutai": { "type": "G4M", "loc": "RE", "hp": 2, "moveTo": "" },34 "753 Kokutai": { "type": "G4M", "loc": "RE", "hp": 2, "moveTo": "" },35 "Misawa Kokutai": { "type": "G4M", "loc": "RE", "hp": 2, "moveTo": "" },36 "Takao Kokutai": { "type": "G4M", "loc": "RE", "hp": 2, "moveTo": "" },37 "1 Kokutai": { "type": "A6M-G4M", "loc": "ML", "hp": 2, "moveTo": "" },38 "Kanoya Kokutai": { "type": "A6M-G4M", "loc": "PH", "hp": 2, "moveTo": "" },39 "Genzan Kokutai": { "type": "A6M-G3M", "loc": "PH", "hp": 2, "moveTo": "" }40 }41 },42 "land": {43 "units": {44 "2-INF": { "cost": 3, "attack": [5, 3], "loc": "EA", "hp": 2, "moveTo": "" },45 "38-INF": { "cost": 2, "attack": [4, 2], "loc": "EA", "hp": 2, "moveTo": "" },46 "48-INF": { "cost": 3, "attack": [5, 3], "loc": "EA", "hp": 2, "moveTo": "" },47 "6TH-INF": { "cost": 1, "attack": [3, 2], "loc": "RE", "hp": 2, "moveTo": "" },48 "7TH-INF": { "cost": 2, "attack": [4, 2], "loc": "RE", "hp": 2, "moveTo": "" },49 "16TH-INF": { "cost": 3, "attack": [5, 3], "loc": "PH", "hp": 2, "moveTo": "" },50 "20TH-INF": { "cost": 1, "attack": [3, 2], "loc": "RE", "hp": 2, "moveTo": "" },51 "35TH-INF": { "cost": 1, "attack": [3, 2], "loc": "RE", "hp": 2, "moveTo": "" },52 "51ST-INF": { "cost": 1, "attack": [3, 2], "loc": "RE", "hp": 2, "moveTo": "" },53 "55TH-INF": { "cost": 2, "attack": [4, 2], "loc": "NG", "hp": 2, "moveTo": "" },54 "6TH-BASE": { "cost": 0, "attack": [2, 1], "loc": "ML", "hp": 2, "moveTo": "" },55 "BN-1": { "cost": 2, "attack": [1, 0], "loc": "MA", "hp": 2, "moveTo": "" },56 "BN-2": { "cost": 2, "attack": [1, 0], "loc": "IJ", "hp": 2, "moveTo": "" },57 "BN-3": { "cost": 2, "attack": [1, 0], "loc": "OK", "hp": 2, "moveTo": "" },58 "BN-4": { "cost": 2, "attack": [1, 0], "loc": "BO", "hp": 2, "moveTo": "" },59 "BN-5": { "cost": 2, "attack": [1, 0], "loc": "GI", "hp": 2, "moveTo": "" },60 "BN-6": { "cost": 2, "attack": [1, 0], "loc": "WI", "hp": 2, "moveTo": "" },61 "BN-7": { "cost": 2, "attack": [1, 0], "loc": "CI", "hp": 2, "moveTo": "" },62 "BN-8": { "cost": 2, "attack": [1, 0], "loc": "JP", "hp": 2, "moveTo": "" },63 "BN-9": { "cost": 2, "attack": [1, 0], "loc": "JP", "hp": 2, "moveTo": "" }64 }65 },66 "ships": {67 "units": {68 "SS1": { "type": "SS", "loc": "--", "hp": 2, "moveTo": "" },69 "SS2": { "type": "SS", "loc": "--", "hp": 2, "moveTo": "" },70 "SS3": { "type": "SS", "loc": "--", "hp": 2, "moveTo": "" },71 "DD1": { "type": "DD", "loc": "--", "hp": 2, "moveTo": "" },72 "DD2": { "type": "DD", "loc": "--", "hp": 2, "moveTo": "" },73 "DD3": { "type": "DD", "loc": "--", "hp": 2, "moveTo": "" },74 "DD4": { "type": "DD", "loc": "--", "hp": 2, "moveTo": "" },75 "DD5": { "type": "DD", "loc": "--", "hp": 2, "moveTo": "" },76 "DD6": { "type": "DD", "loc": "--", "hp": 2, "moveTo": "" },77 "DD7": { "type": "DD", "loc": "--", "hp": 2, "moveTo": "" },78 "AOBA-KINUGASA": { "type": "CG", "loc": "--", "hp": 2, "moveTo": "" },79 "ASHIGARA-NASHI": { "type": "CG", "loc": "--", "hp": 2, "moveTo": "" },80 "FURUTAKA-KAKO": { "type": "CG", "loc": "--", "hp": 2, "moveTo": "" },81 "MAYA-ATAGO": { "type": "CG", "loc": "--", "hp": 2, "moveTo": "" },82 "MAGOMI-MIKUMA": { "type": "CG", "loc": "--", "hp": 2, "moveTo": "" },83 "MYOKO-HAGURO": { "type": "CG", "loc": "--", "hp": 2, "moveTo": "" },84 "SUZUYA-KUMANO": { "type": "CG", "loc": "--", "hp": 2, "moveTo": "" },85 "TAKAO-CHOKAI": { "type": "CG", "loc": "--", "hp": 2, "moveTo": "" },86 "TONE-CHIKUMA": { "type": "CG", "loc": "--", "hp": 2, "moveTo": "" },87 "YAMATO-MUSASHI": { "type": "BB-YAMATO", "loc": "--", "hp": 2, "moveTo": "" },88 "NAGATO-MUTSU": { "type": "BB-NAGATO", "loc": "--", "hp": 2, "moveTo": "" },89 "KONGO-HARUNA": { "type": "BB-KONGO", "loc": "--", "hp": 2, "moveTo": "" },90 "HIEI-KIRISHIMA": { "type": "BB-KONGO", "loc": "--", "hp": 2, "moveTo": "" },91 "FUSO-YAMASHIRO": { "type": "BB-FUSO", "loc": "--", "hp": 2, "moveTo": "" },92 "ISE-HYUGA": { "type": "BB-FUSO", "loc": "--", "hp": 2, "moveTo": "" },93 "AKAGI": { "type": "CV", "loc": "--", "hp": 2, "moveTo": "" },94 "KAGA": { "type": "CV", "loc": "--", "hp": 2, "moveTo": "" },95 "SORYU": { "type": "CV", "loc": "--", "hp": 2, "moveTo": "" },96 "HIRYU": { "type": "CV", "loc": "--", "hp": 2, "moveTo": "" },97 "SHOKAKU": { "type": "CV", "loc": "--", "hp": 2, "moveTo": "" },98 "ZUIKAKU": { "type": "CV", "loc": "--", "hp": 2, "moveTo": "" },99 "HIYO": { "type": "CV", "loc": "--", "hp": 2, "moveTo": "" },100 "JUNYO": { "type": "CV", "loc": "--", "hp": 2, "moveTo": "" },101 "HOSHO": { "type": "CVL", "loc": "--", "hp": 2, "moveTo": "" },102 "RYUJO": { "type": "CVL", "loc": "--", "hp": 2, "moveTo": "" },103 "SHOHO": { "type": "CVL", "loc": "--", "hp": 2, "moveTo": "" },104 "ZUIHO": { "type": "CVL", "loc": "--", "hp": 2, "moveTo": "" },105 "CHUYO": { "type": "CVE", "loc": "--", "hp": 2, "moveTo": "" },106 "RYUHO": { "type": "CVE", "loc": "--", "hp": 2, "moveTo": "" },107 "UNYO": { "type": "CVE", "loc": "--", "hp": 2, "moveTo": "" },108 "TAIYO": { "type": "CVE", "loc": "--", "hp": 2, "moveTo": "" } 109 },110 "class": {111 "SS": { "cost": 2, "aa": null, "aship": [3, 2], "asw": [1, 1], "type": "Sub" },112 "DD": { "cost": 2, "aa": [2, 1], "aship": [3, 2], "asw": [1, 1], "type": "Surf" },113 "CG": { "cost": 2, "aa": [2, 1], "aship": [4, 2], "asw": [1, 1], "type": "Surf" },114 "BB-YAMATO": { "cost": 4, "aa": [3, 2], "aship": [7, 4], "asw": [2, 1], "type": "Surf" },115 "BB-NAGATO": { "cost": 3, "aa": [2, 1], "aship": [6, 3], "asw": [1, 1], "type": "Surf" },116 "BB-KONGO": {"cost": 3, "aa": [3, 2], "aship": [5, 3], "asw": [1, 1], "type": "Surf" },117 "BB-FUSO": {"cost": 3, "aa": [2, 1], "aship": [5, 3], "asw": [1, 1], "type": "Surf" },118 "CV": { "cost": 1, "aa": [4, 2], "saa": [2, 1], "aship": null, "asw": [2, 1], "type": "Carrier" },119 "CVL": { "cost": 1, "aa": [2, 1], "saa": [1, 0], "aship": null, "asw": [1, 1], "type": "Carrier" },120 "CVE": { "cost": 1, "aa": [2, 1], "saa": [1, 0], "aship": null, "asw": [1, 1], "type": "Carrier" }121 }122 }123 },124 "US": {125 "air": {126 "types": {127 "F4F": { "cost": 1, "aa": [5, 3], "saa": [3, 2], "aship": [1, 1], "asurf": [2, 1] },128 "SBD": { "cost": 2, "aa": null, "saa": null, "aship": [4, 2], "asurf": [3, 2] },129 "TBD": { "cost": 1, "aa": null, "saa": null, "aship": [3, 2], "asurf": [2, 1] },130 "P39": { "cost": 2, "aa": [3, 2], "saa": [2, 1], "aship": [1, 1], "asurf": [3, 2] },131 "P40": { "cost": 2, "aa": [5, 3], "saa": [3, 2], "aship": [1, 1], "asurf": [2, 1] },132 "B17": { "cost": 1, "aa": null, "saa": null, "aship": [1, 1], "asurf": [4, 2] },133 "B24": { "cost": 1, "aa": null, "saa": null, "aship": [1, 1], "asurf": [4, 2] },134 "B25": { "cost": 2, "aa": null, "saa": null, "aship": [3, 2], "asurf": [3, 2] },135 "B26": { "cost": 2, "aa": null, "saa": null, "aship": [3, 2], "asurf": [3, 2] },136 "ANSON": { "cost": 1, "aa": null, "saa": null, "aship": [1, 1], "asurf": [2, 1] },137 "BFIGHT": { "cost": 2, "aa": [3, 2], "saa": [2, 1], "aship": [3, 2], "asurf": [3, 2] },138 "F4F-SBD0": { "cost": 2, "aa": [5, 3], "saa": [3, 2], "aship": [4, 2], "asurf": [3, 2] },139 "F4F-SBD1": { "cost": 2, "aa": [3, 2], "saa": [2, 1], "aship": [4, 2], "asurf": [3, 2] },140 "F4F-SBD2": { "cost": 2, "aa": [3, 2], "saa": [2, 1], "aship": [3, 2], "asurf": [3, 2] }141 },142 "units": {143 "18-FG": { "type": "P39", "loc": "HI", "hp": 2, "moveTo": "" },144 "RAAF-FG": { "type": "P40", "loc": "NG", "hp": 2, "moveTo": "", "cost": 1, "au": true },145 "8-FG": { "type": "P40", "loc": "RE", "hp": 2, "moveTo": "" },146 "49-FG": { "type": "P40", "loc": "RE", "hp": 2, "moveTo": "" },147 "343-FG": { "type": "P40", "loc": "AK", "hp": 2, "moveTo": "" },148 "11-BG": { "type": "B17", "loc": "HI", "hp": 2, "moveTo": "" },149 "19-BG": { "type": "B17", "loc": "AU", "hp": 2, "moveTo": "" },150 "28-BG": { "type": "B17", "loc": "AK", "hp": 2, "moveTo": "" },151 "43-BG": { "type": "B17", "loc": "RE", "hp": 2, "moveTo": "" },152 "90-BG": { "type": "B24", "loc": "RE", "hp": 2, "moveTo": "" },153 "3-BG": { "type": "B25", "loc": "RE", "hp": 2, "moveTo": "" },154 "38-BG": { "type": "B25", "loc": "RE", "hp": 2, "moveTo": "" },155 "22-BG": { "type": "B26", "loc": "RE", "hp": 2, "moveTo": "" },156 "RAAF-BG1": { "type": "ANSON", "loc": "NG", "hp": 2, "moveTo": "", "au": true },157 "RAAF-BG2": { "type": "BFIGHT", "loc": "RE", "hp": 2, "moveTo": "", "au": true },158 "13-MAG": { "type": "F4F-SBD0", "loc": "SA", "hp": 2, "moveTo": "" },159 "21-MAG": { "type": "F4F-SBD0", "loc": "HI", "hp": 2, "moveTo": "" },160 "23-MAG": { "type": "F4F-SBD1", "loc": "RE", "hp": 2, "moveTo": "" },161 "22-MAG": { "type": "F4F-SBD2", "loc": "MI", "hp": 2, "moveTo": "" }162 }163 },164 "land": {165 "units": {166 "1AU-INF": { "cost": 1, "attack": [4, 2], "loc": "RE", "au": true, "hp": 2, "moveTo": "" },167 "AMERICAN-INF": { "cost": 1, "attack": [3, 2], "loc": "RE", "hp": 2, "moveTo": "" },168 "USAFFE": { "cost": 1, "attack": [3, 2], "loc": "RE", "hp": 2, "moveTo": "" },169 "25-INF": { "cost": 1, "attack": [3, 2], "loc": "HI", "hp": 2, "moveTo": "" },170 "32-INF": { "cost": 1, "attack": [3, 2], "loc": "RE", "hp": 2, "moveTo": "" },171 "43-INF": { "cost": 1, "attack": [3, 2], "loc": "RE", "hp": 2, "moveTo": "" },172 "1-MARINE": { "cost": 2, "attack": [5, 3], "loc": "RE", "marine": true, "hp": 2, "moveTo": "" },173 "2-MARINE": { "cost": 2, "attack": [5, 3], "loc": "RE", "marine": true, "hp": 2, "moveTo": "" },174 "BN-1": { "cost": 2, "attack": [1, 0], "loc": "NC", "marine": true, "hp": 2, "moveTo": "" },175 "BN-2": { "cost": 2, "attack": [1, 0], "loc": "BO", "marine": true, "hp": 2, "moveTo": "" },176 "BN-3": { "cost": 2, "attack": [1, 0], "loc": "SI", "marine": true, "hp": 2, "moveTo": "" },177 "BN-4": { "cost": 2, "attack": [1, 0], "loc": "WC", "marine": true, "hp": 2, "moveTo": "" },178 "BN-5": { "cost": 2, "attack": [1, 0], "loc": "WC", "marine": true, "hp": 2, "moveTo": "" }179 }180 },181 "ships": {182 "class": {183 "SS": { "cost": 2, "aa": null, "aship": [2, 1], "asw": [1, 1], "type": "Sub" },184 "DD": { "cost": 2, "aa": [3, 2], "aship": [2, 1], "asw": [3, 2], "type": "Surf" },185 "CY-YORKTOWN": { "cost": 5, "priorityCost": 1, "aa": [4, 2], "saa": [2, 1], "aship": null, "asw": [2, 1], "type": "Carrier" },186 "CV-WASP": { "cost": 5, "priorityCost": 1, "aa": [2, 1], "saa": [1, 0], "aship": null, "asw": [2, 1], "type": "Carrier" },187 "CV-LEXINGTON": { "cost": 5, "priorityCost": 1, "aa": [2, 1], "saa": [1, 0], "aship": null, "asw": [2, 1], "type": "Carrier" },188 "BB-NCAROLINA": { "cost": 4, "aa": [4, 2], "aship": [6, 3], "asw": [2, 1], "type": "Surf" },189 "BB-SDAKOTA": { "cost": 4, "aa": [4, 2], "aship": [6, 3], "asw": [2, 1], "type": "Surf" },190 "BB-COLORADO": { "cost": 3, "aa": [3, 2], "aship": [4, 2], "asw": [2, 1], "type": "Surf" },191 "BB-NEWMEXICO": { "cost": 3, "aa": [3, 2], "aship": [4, 2], "asw": [2, 1], "type": "Surf" },192 "CG-BROOKLYN": { "cost": 2, "aa": [3, 2], "aship": [3, 2], "asw": [2, 1], "type": "Surf" },193 "CG-NORTHAMPTON": { "cost": 2, "aa": [2, 1], "aship": [4, 2], "asw": [2, 1], "type": "Surf" },194 "CG-PENSACOLA": { "cost": 2, "aa": [2, 1], "aship": [4, 2], "asw": [2, 1], "type": "Surf" },195 "CG-PORTLAND": { "cost": 2, "aa": [2, 1], "aship": [4, 2], "asw": [2, 1], "type": "Surf" },196 "CG-NEWORLEANS": { "cost": 2, "aa": [2, 1], "aship": [4, 2], "asw": [2, 1], "type": "Surf" },197 "CG-ABDA": { "cost": 2, "aa": [2, 1], "aship": [4, 2], "asw": [1, 1], "type": "Surf" }198 },199 "units": {200 "SS1": { "type": "SS", "loc": "HI", "hp": 2, "moveTo": "" },201 "SS2": { "type": "SS", "loc": "P1", "hp": 2, "moveTo": "" },202 "SS3": { "type": "SS", "loc": "AU", "hp": 2, "moveTo": "" },203 "SS4": { "type": "SS", "loc": "P1", "hp": 2, "moveTo": "" },204 "DD1": { "type": "DD", "loc": "HI", "hp": 2, "moveTo": "" },205 "DD2": { "type": "DD", "loc": "WC", "hp": 2, "moveTo": "" },206 "DD4": { "type": "DD", "loc": "P1", "hp": 2, "moveTo": "" },207 "DD6": { "type": "DD", "loc": "HI", "hp": 2, "moveTo": "" },208 "DD12": { "type": "DD", "loc": "P1", "hp": 2, "moveTo": "" },209 "YORKTOWN": { "type": "CV-YORKTOWN", "loc": "P1", "hp": 2, "moveTo": "" },210 "ENTERPRISE": { "type": "CV-YORKTOWN", "loc": "HI", "hp": 2, "moveTo": "" },211 "HORNET": { "type": "CV-YORKTOWN", "loc": "RE", "hp": 2, "moveTo": "" },212 "WASP": { "type": "CV-WASP", "loc": "RE", "hp": 2, "moveTo": "" },213 "LEXINGTON": { "type": "CV-LEXINGTON", "loc": "HI", "hp": 2, "moveTo": "" },214 "SARATOGA": { "type": "CV-LEXINGTON", "loc": "P1", "hp": 2, "moveTo": "" },215 "NCAROLINA-WASHINGTON": { "type": "BB-NCAROLINA", "loc": "RE", "hp": 2, "moveTo": "" },216 "SDAKOTA-INDIANA": { "type": "BB-SDAKOTA", "loc": "RE", "hp": 2, "moveTo": "" },217 "COLORADO-MARYLAND": { "type": "BB-COLORADO", "loc": "RE", "hp": 2, "moveTo": "" },218 "NEWMEXICO-MISSISIPI": { "type": "BB-NEWMEXICO", "loc": "RE", "hp": 2, "moveTo": "" },219 "HONOLULU-NASHVILLE": { "type": "CG-BROOKLYN", "loc": "HI", "hp": 2, "moveTo": "" },220 "PHOENIX-BOISE": { "type": "CG-BROOKLYN", "loc": "P1", "hp": 2, "moveTo": "" },221 "STLOUIS-HELENA": { "type": "CG-BROOKLYN", "loc": "P1", "hp": 2, "moveTo": "" },222 "CHESTER-LOUISVILLE": { "type": "CG-NORTHAMPTON", "loc": "HI", "hp": 2, "moveTo": "" },223 "CHICAGO-NORTHAMPTON": { "type": "CG-NORTHAMPTON", "loc": "HI", "hp": 2, "moveTo": "" },224 "PENSACOLA-SALTLAKECITY": { "type": "CG-PENSACOLA", "loc": "P1", "hp": 2, "moveTo": "" },225 "PORTLAND-INDIANAPOLIS": { "type": "CG-PORTLAND", "loc": "P1", "hp": 2, "moveTo": "" },226 "NEWORLEANS-MINNEAPOLIS": { "type": "CG-NEWORLEANS", "loc": "HI", "hp": 2, "moveTo": "" },227 "SANFRANCISCO-ASTORIA": { "type": "CG-NEWORLEANS", "loc": "HI", "hp": 2, "moveTo": "" },228 "VINCENNES-QUINCY": { "type": "CG-NEWORLEANS", "loc": "RE", "hp": 2, "moveTo": "" },229 "ABDA": { "type": "CG-ABDA", "loc": "AU", "hp": 2, "moveTo": "" }230 }231 }232 }233 },234 "1943": {235 },236 "1944": {237 },238 "1945": {239 }240}241// NOSONAR242// const forcesByArea = {243// JA: {244// HI: {245// air: {246// units: [], count: 0247// },248// land: {249// units: [], count: 0250// },251// sea: {252// units: [], count: 0253// },254// ashoreCount: 0255// } 256// }257// }258const forcesByArea = {259}260export const setForcesByArea = (year = '1942') => {261 forcesByArea['JA'] = { }262 forcesByArea['US'] = { }263 getAreaIdList().forEach((area) => {264 forcesByArea['JA'][area] = {265 air: { units: [], count: 0 },266 land: { units: [], count: 0 },267 sea: { units: [], count: 0 },268 ashoreCount: 0269 } 270 forcesByArea['US'][area] = {271 air: { units: [], count: 0 },272 land: { units: [], count: 0 },273 sea: { units: [], count: 0 },274 ashoreCount: 0275 } 276 })277 278 for (const side of forces) {279 const forcesSide = forces[year][side]280 for (const category of forcesSide) {281 const forcesSideCategory = forcesSide[category]282 for (const unit of forcesSideCategory.units) {283 // unit.moveTo = '' // reset unit to not moved284 const area = unit.loc285 if (area !== '--') { // not sunk/destroyed286 forcesByArea[side][area][categpry].units.push(unit)287 forcesByArea[side][area][categpry].count += 1288 if (category !== 'sea') { // not ship289 forcesByArea[side][area].ashoreCount += 1290 }291 }292 }293 }294 }295}296export const Scouting (year = '1942') => {297 getAreaIdList().forEach((area) => {298 if (forcesByArea.JA[area].ashoreCount === 1) { // if only 1 JA Ashore, set it as moved299 const category = (forcesByArea.JA[area]['air'].count === 1) ? 'air' : 'land'300 const unitId = forcesByArea.JA[area]['air'].units[0]301 const unit = forces[year][side]['air'].units[unitId]302 unit.moveTo = unit.loc303 }304 })305} 306export const iterateForces = (year = '1942', action = null) => {307 for (const side of forces) {308 const forcesSide = forces[year][side]309 for (const category of forcesSide) {310 const forcesSideCategory = forcesSide[category]311 for (const unit of forcesSideCategory.units) {312 unit.moveTo = '' // reset unit to not moved313 }314 }315 }316}...

Full Screen

Full Screen

livro.js

Source:livro.js Github

copy

Full Screen

...25}26function losango(c, x1 , y1 , x2, y2){27 c.beginPath();28 29 c.moveTo( 0.12 + x1 + x2, 0.32 - y1 + y2);30 c.lineTo( 0.11+ x1 + x2, 0.65 - y1 + y2);31 c.lineTo( 0.27 + x1 + x2, 0.69 + y1 - y2);32 c.lineTo( 0.28 + x1 + x2, 0.38 - 0.02 + y1 -y2);33 c.closePath();34}35function circulo(c){36 c.beginPath();37 c.ellipse(30.6,12,2,2,0,0,2*Math.PI);38 c.closePath();39}40function triangulo(c){41 c.beginPath();42 c.moveTo(0.58, 0.335);43 c.lineTo(0.56, 0.31);44 c.lineTo(0.60,0.31);45 c.closePath();46}47function trianguloRetangulo(c){48 c.beginPath();49 c.moveTo(1,0);50 c.lineTo(0,1);51 c.lineTo(-1,0);52 c.closePath();53}54function linhaLocalizador(c){55 c.beginPath();56 c.moveTo(0.29, 0.565);57 c.lineTo(0.29, 0.595);58 c.closePath();59}60function linhasEscuras(c){61 c.beginPath();62 //linha de cima -esquerda (cima para baixo)63 c.moveTo(0.12,0.32);64 c.lineTo(0.16, 0.38);65 c.moveTo(0.16,0.38);66 c.lineTo(0.20,0.34);67 c.moveTo(0.20,0.34);68 c.lineTo(0.281,0.44);69 c.moveTo(0.281,0.44);70 c.lineTo(0.285,0.45);71 c.moveTo(0.285,0.45);72 c.lineTo(0.32,0.46);73 c.moveTo(0.32,0.46);74 c.lineTo(0.35,0.52);75 76 //linha de baixo -esquerda (baixo para cima)77 c.moveTo(0.11,0.62);78 c.lineTo(0.16,0.64);79 c.moveTo(0.16,0.64);80 c.lineTo(0.225,0.61);81 c.moveTo(0.225,0.61);82 c.lineTo(0.20,0.56);83 c.moveTo(0.20,0.56);84 c.lineTo(0.233,0.54);85 c.moveTo(0.233,0.54);86 c.lineTo(0.23,0.48);87 c.moveTo(0.23,0.48);88 c.lineTo(0.28,0.50);89 //linha do meio da direta -meio(baixo para cima)90 c.moveTo(0.41,0.67);91 c.lineTo(0.39,0.63);92 c.moveTo(0.39,0.63);93 c.lineTo(0.41,0.60);94 c.moveTo(0.41,0.60);95 c.lineTo(0.38,0.59);96 c.moveTo(0.38,0.59); //esta!97 c.lineTo(0.41,0.56);98 c.moveTo(0.41,0.56);99 c.lineTo(0.39,0.51);100 c.moveTo(0.39,0.51);101 c.lineTo(0.425,0.47);102 c.moveTo(0.425,0.47);103 c.lineTo(0.42,0.405);104 c.moveTo(0.42,0.405);105 c.lineTo(0.38,0.43);106 c.moveTo(0.38,0.43);107 c.lineTo(0.35,0.40);108 c.moveTo(0.35,0.40);109 c.lineTo(0.40,0.37);110 111 //linha da esquerda em baixo -meio (cima para baixo)112 c.moveTo(0.38,0.59);113 c.lineTo(0.355,0.615);114 c.moveTo(0.355,0.615);115 c.lineTo(0.356,0.66);116 117 //linha do meio que vem da direita para a esquerda -meio118 c.moveTo(0.452,0.49);119 c.lineTo(0.415,0.55);120 c.moveTo(0.415,0.55);121 c.lineTo(0.39,0.54);122 c.moveTo(0.39,0.54);123 c.lineTo(0.37,0.56);124 //linha da direita em baixo - direita 125 c.moveTo(0.56,0.65);126 c.lineTo(0.59,0.61);127 c.moveTo(0.59,0.61);128 c.lineTo(0.51,0.615);129 c.moveTo(0.51,0.615);130 c.lineTo(0.555,0.58);131 c.moveTo(0.572,0.557);132 c.lineTo(0.555,0.554);133 //liha do meio - direita (de baixo ate ao topo)134 c.moveTo(0.545,0.55);135 c.lineTo(0.53,0.547);136 c.moveTo(0.53,0.547);137 c.lineTo(0.58,0.43);138 c.moveTo(0.58,0.43);139 c.lineTo(0.50,0.431);140 c.moveTo(0.50,0.431);141 c.lineTo(0.53,0.35);142 //linha solta em baixo da esquerda para a direita - direita143 c.moveTo(0.543,0.56);144 c.lineTo(0.475,0.60);145 c.moveTo(0.475,0.60);146 c.lineTo(0.485,0.62);147 c.moveTo(0.485,0.62);148 c.lineTo(0.47,0.645);149 c.closePath();150 151}152function linhasClaras(c){153 c.beginPath();154 155 //linhas de cima - esquerda156 c.moveTo(0.26,0.355);157 c.lineTo(0.238,0.37);158 c.moveTo(0.238,0.37);159 c.lineTo(0.24,0.41);160 c.moveTo(0.24,0.41);161 c.lineTo(0.21,0.42);162 c.moveTo(0.21,0.42);163 c.lineTo(0.19,0.45);164 c.moveTo(0.19,0.45);165 c.lineTo(0.23,0.465);166 c.moveTo(0.23,0.465);167 c.lineTo(0.21,0.485);168 c.moveTo(0.21,0.42);169 c.lineTo(0.19,0.39);170 c.moveTo(0.19,0.39);171 c.lineTo(0.15,0.41);172 c.moveTo(0.15,0.41);173 c.lineTo(0.135,0.37);174 //linha do meio à esquerda - esquerda175 c.moveTo(0.115,0.44);176 c.lineTo(0.175,0.48);177 c.moveTo(0.175,0.48);178 c.lineTo(0.175,0.488);179 //linha por baixo do localizador - esquerda180 c.moveTo(0.16,0.53);181 c.lineTo(0.157,0.54);182 c.moveTo(0.157,0.54);183 c.lineTo(0.185,0.57);184 c.moveTo(0.185,0.57);185 c.lineTo(0.165,0.58);186 c.moveTo(0.166,0.58);187 c.lineTo(0.11,0.58);188 //linha em baixo ao lado do localizador grande - esquerda189 c.moveTo(0.212,0.58);190 c.lineTo(0.24,0.593);191 //linha colada ao localizador por baixo - esquerda192 c.moveTo(0.257,0.625);193 c.lineTo(0.249,0.630);194 c.moveTo(0.249,0.630);195 c.lineTo(0.273,0.66);196 //linhas na parte de baixo - esquerda197 c.moveTo(0.225,0.61);198 c.lineTo(0.248,0.64);199 c.moveTo(0.248,0.64);200 c.lineTo(0.21,0.66);201 c.moveTo(0.21,0.66);202 c.lineTo(0.245,0.67);203 c.moveTo(0.245,0.67);204 c.lineTo(0.26,0.685);205 c.moveTo(0.225,0.61);206 c.lineTo(0.20,0.65);207 c.moveTo(0.20,0.65);208 c.lineTo(0.16,0.65);209 c.moveTo(0.27,0.53);210 c.lineTo(0.27,0.556);211 //linhas de cima - meio212 c.moveTo(0.295,0.36);213 c.lineTo(0.305,0.375);214 c.moveTo(0.305,0.375);215 c.lineTo(0.33,0.385);216 c.moveTo(0.33,0.385);217 c.lineTo(0.325,0.43);218 c.moveTo(0.325,0.43);219 c.lineTo(0.36,0.455);220 c.moveTo(0.36,0.455);221 c.lineTo(0.39,0.43);222 //linhas do meio -meio223 c.moveTo(0.305,0.458);224 c.lineTo(0.315,0.53);225 c.moveTo(0.315,0.53);226 c.lineTo(0.355,0.53);227 c.moveTo(0.355,0.53);228 c.lineTo(0.36,0.56);229 c.moveTo(0.36,0.56);230 c.lineTo(0.37,0.56);231 c.moveTo(0.37,0.56);232 c.lineTo(0.37,0.597);233 c.moveTo(0.28,0.66);234 c.lineTo(0.30,0.658);235 c.moveTo(0.30,0.658);236 c.lineTo(0.315,0.67);237 //linhas da esquerda - direita238 c.moveTo(0.458,0.38);239 c.lineTo(0.47,0.45);240 c.moveTo(0.47,0.45);241 c.lineTo(0.456, 0.49);242 c.moveTo(0.456,0.49);243 c.lineTo(0.48, 0.52);244 c.moveTo(0.48,0.52);245 c.lineTo(0.478,0.52);246 c.moveTo(0.478,0.52);247 c.lineTo(0.481,0.55);248 c.moveTo(0.481,0.55);249 c.lineTo(0.50,0.565);250 c.moveTo(0.50,0.565);251 c.lineTo(0.483,0.595);252 c.moveTo(0.483,0.595);253 c.lineTo(0.51,0.60);254 c.moveTo(0.51,0.60);255 c.lineTo(0.490,0.635);256 c.moveTo(0.490,0.635);257 c.lineTo(0.502,0.638);258 c.moveTo(0.502,0.638);259 c.lineTo(0.505,0.655);260 c.moveTo(0.505,0.655);261 c.lineTo(0.513,0.663);262 c.moveTo(0.513,0.663);263 c.lineTo(0.54,0.66)264 //linha na parte de baixo a direira - direita265 c.moveTo(0.56,0.65);266 c.lineTo(0.545,0.665);267 c.moveTo(0.545,0.665);268 c.lineTo(0.59,0.662);269 c.moveTo(0.59,0.662);270 c.lineTo(0.586,0.678);271 c.moveTo(0.586,0.678);272 c.lineTo(0.595,0.682);273 //linha no meio mesmo - direita274 c.moveTo(0.525,0.43);275 c.lineTo(0.52,0.448);276 c.moveTo(0.52,0.448);277 c.lineTo(0.57,0.465);278 c.moveTo(0.57,0.465);279 c.lineTo(0.53,0.527);280 c.moveTo(0.53,0.527);281 c.lineTo(0.567,0.567);282 //linda de cima da direita - direita283 c.moveTo(0.555,0.345);284 c.lineTo(0.565,0.375);285 c.moveTo(0.565,0.375);286 c.lineTo(0.605,0.356);287 c.moveTo(0.605,0.356);288 c.lineTo(0.622,0.38);289 //mini linha da direita -direita290 c.moveTo(0.622,0.42);291 c.lineTo(0.613,0.425);292 //linha pequeninca do meio da direita - direita293 c.moveTo(0.622,0.53);294 c.lineTo(0.605,0.53);295 c.moveTo(0.605,0.53);296 c.lineTo(0.605,0.57);297 298 c.closePath();299}300function linhasWidth(c){301 c.beginPath();302 303 c.moveTo(0.53,0.35);304 c.lineTo(0.485,0.37);305 306 c.moveTo(0.62,0.63);307 c.lineTo(0.56,0.65);308 c.moveTo(0.35,0.52);309 c.lineTo(0.385,0.515);310 c.moveTo(0.40,0.37);311 c.lineTo(0.375,0.34); 312 c.moveTo(0.356,0.66);313 c.lineTo(0.315, 0.67);314 c.moveTo(0.315,0.67);315 c.lineTo(0.315,0.70);316 c.closePath();317}318function letrasCima(c){319 c.beginPath();320 321 c.font="bold italic 30px Bodoni MT";322 c.fillText("Paper Towns",0,0);323 c.closePath();324}325function letrasBaixo(c){326 c.beginPath();327 c.font = "bold 30px Calibri";328 c.fillText("JOHN GREEN", 0, 0);...

Full Screen

Full Screen

custom.js

Source:custom.js Github

copy

Full Screen

...98 if(typeof e.originalEvent.detail == 'number' && e.originalEvent.detail !== 0) {99if(e.originalEvent.detail > 0) {100 101 if (destination.index == 1) {102 fullpage_api.moveTo(7);103 destination.index = {};104 }105 if (destination.index == 6) {106 107 fullpage_api.moveTo(12);108 destination.index = {};109 }110 if (destination.index == 11) {111 fullpage_api.moveTo(17);112 destination.index = {};113 }114} else if(e.originalEvent.detail < 0){115 if (destination.index == 16) {116 fullpage_api.moveTo(12);117 destination.index = {};118 } 119120 if (destination.index == 11 ) {121 122 fullpage_api.moveTo(7);123 destination.index = {};124 } 125if (destination.index == 6 ) {126 fullpage_api.moveTo(2);127 destination.index = {};128 } 129if (destination.index == 1 ) {130 fullpage_api.moveTo(1);131 destination.index = {};132 } 133134135}136} else if (typeof e.originalEvent.wheelDelta == 'number') {137if(e.originalEvent.wheelDelta < 0) {138139 140 if (destination.index == 1) {141 fullpage_api.moveTo(7);142 destination.index = {};143 }144 if (destination.index == 6) {145 146 fullpage_api.moveTo(12);147 destination.index = {};148 }149 if (destination.index == 11) {150 fullpage_api.moveTo(17);151 destination.index = {};152 }153 if (destination.index == 0) {154 fullpage_api.moveTo(2);155 destination.index = {};156 }157} else if(e.originalEvent.wheelDelta > 0) {158 159 if (destination.index == 16) {160 fullpage_api.moveTo(12);161 destination.index = {};162 } 163164 if (destination.index == 11 ) {165 166 fullpage_api.moveTo(7);167 destination.index = {};168 } 169if (destination.index == 6 ) {170 fullpage_api.moveTo(2);171 destination.index = {};172 } 173if (destination.index == 1 ) {174 fullpage_api.moveTo(1);175 destination.index = {};176 } 177}178}179if(code == 40) {180181if (destination.index == 1) {182 fullpage_api.moveTo(7);183 destination.index = {};184 }185 if (destination.index == 6) {186 187 fullpage_api.moveTo(12);188 destination.index = {};189 }190 if (destination.index == 11) {191 fullpage_api.moveTo(17);192 destination.index = {};193 }194 if (destination.index == 0) {195 fullpage_api.moveTo(2);196 destination.index = {};197 }198199} 200if(code == 38) {201202 if (destination.index == 16) {203 fullpage_api.moveTo(12);204 destination.index = {};205 } 206207 if (destination.index == 11 ) {208 209 fullpage_api.moveTo(7);210 destination.index = {};211 } 212if (destination.index == 6 ) {213 fullpage_api.moveTo(2);214 destination.index = {};215 } 216if (destination.index == 1 ) {217 fullpage_api.moveTo(1);218 destination.index = {};219 } 220221} 222 223 /* if (destination.index == 17) {224 225 fullpage_api.moveTo(1);226 return false;227 } */228 229 });230231 $(document).bind('touchend', function (e)232{233234//alert(destination.index);235if (destination.index == 2) {236 fullpage_api.moveTo(7);237 destination.index = {};238 }239 if (destination.index == 6) {240 241 fullpage_api.moveTo(12);242 destination.index = {};243 }244 if (destination.index == 11) {245 fullpage_api.moveTo(17);246 destination.index = {};247 }248 if (destination.index == 0) {249 fullpage_api.moveTo(2);250 destination.index = {};251 } 252});253 //leaving the first slide of the 2nd Section to the right254 255}256257});258document.querySelector('.fun').addEventListener('click', function(e){259 e.preventDefault();260 fullpage_api.silentMoveTo(12);261});262document.querySelector('.mood').addEventListener('click', function(e){263 e.preventDefault();264 fullpage_api.silentMoveTo(7);265});266document.querySelector('.iic').addEventListener('click', function(e){267 e.preventDefault();268 fullpage_api.silentMoveTo(2);269});270$('.iic-second').click(function(event) {271event.preventDefault();272fullpage_api.moveTo(2);273274}); 275$('.top-menu-first').click(function(event) {276event.preventDefault();277fullpage_api.moveTo(2);278279}); 280$('.iic-detail').click(function(event) {281event.preventDefault();282fullpage_api.moveTo(3);283284});285$('.iic-detail-two').click(function(event) {286event.preventDefault();287fullpage_api.moveTo(4);288289}); 290$('.iic-detail-three').click(function(event) {291event.preventDefault();292fullpage_api.moveTo(5);293294});295$('.iic-detail-four').click(function(event) {296event.preventDefault();297fullpage_api.moveTo(6);298299});300$('.iic-detail-five').click(function(event) {301event.preventDefault();302fullpage_api.moveTo(17);303304}); 305$('.mood-detail-one').click(function(event) {306307event.preventDefault();308fullpage_api.moveTo(8);309310}); 311$('.top-menu-second').click(function(event) {312event.preventDefault();313fullpage_api.moveTo(7);314315}); 316$('.mood-detail-two').click(function(event) {317event.preventDefault();318fullpage_api.moveTo(9);319320});321$('.mood-detail-three').click(function(event) {322event.preventDefault();323fullpage_api.moveTo(10);324325});$('.mood-detail-four').click(function(event) {326event.preventDefault();327fullpage_api.moveTo(11);328329});330$('.mood-detail-five').click(function(event) {331event.preventDefault();332fullpage_api.moveTo(17);333334});335$('.top-menu-third').click(function(event) {336event.preventDefault();337fullpage_api.moveTo(12);338339});340$('.fun-detail-one').click(function(event) {341event.preventDefault();342fullpage_api.moveTo(13);343344}); 345$('.fun-detail-two').click(function(event) {346event.preventDefault();347fullpage_api.moveTo(14);348349}); 350$('.fun-detail-three').click(function(event) {351event.preventDefault();352fullpage_api.moveTo(15);353354});355$('.fun-detail-four').click(function(event) {356event.preventDefault();357fullpage_api.moveTo(16);358359});360$('.fun-detail-five').click(function(event) {361event.preventDefault();362fullpage_api.moveTo(17);363364}); 365$('.mood-second').click(function(event) {366event.preventDefault();367fullpage_api.moveTo(14);368369}); 370$('.fun-second').click(function(event) {371event.preventDefault();372fullpage_api.moveTo(4, 0);373374}); 375$('.iic-third').click(function(event) {376event.preventDefault();377fullpage_api.moveTo(2, 0);378379});380$('.mood-third').click(function(event) {381event.preventDefault();382fullpage_api.moveTo(3, 0);383384});385$('.fun-third').click(function(event) {386event.preventDefault();387fullpage_api.moveTo(4, 0);388389});390$('.iic-four').click(function(event) {391event.preventDefault();392fullpage_api.moveTo(2);393394});395$('.back').click(function(event) {396event.preventDefault();397fullpage_api.moveTo(1);398399});400$('.mood-four').click(function(event) {401event.preventDefault();402fullpage_api.moveTo(8);403404});405$('.fun-four').click(function(event) {406event.preventDefault();407fullpage_api.moveTo(14);408 ...

Full Screen

Full Screen

android-complex.js

Source:android-complex.js Github

copy

Full Screen

...112 a2.press({x: 250, y: 100}).release();113 var smile = new wd.TouchAction();114 smile115 .press({x:110, y:200})116 .moveTo({x:1, y:1})117 .moveTo({x:1, y:1})118 .moveTo({x:1, y:1})119 .moveTo({x:1, y:1})120 .moveTo({x:1, y:1})121 .moveTo({x:2, y:1})122 .moveTo({x:2, y:1})123 .moveTo({x:2, y:1})124 .moveTo({x:2, y:1})125 .moveTo({x:2, y:1})126 .moveTo({x:3, y:1})127 .moveTo({x:3, y:1})128 .moveTo({x:3, y:1})129 .moveTo({x:3, y:1})130 .moveTo({x:3, y:1})131 .moveTo({x:4, y:1})132 .moveTo({x:4, y:1})133 .moveTo({x:4, y:1})134 .moveTo({x:4, y:1})135 .moveTo({x:4, y:1})136 .moveTo({x:5, y:1})137 .moveTo({x:5, y:1})138 .moveTo({x:5, y:1})139 .moveTo({x:5, y:1})140 .moveTo({x:5, y:1})141 .moveTo({x:5, y:0})142 .moveTo({x:5, y:0})143 .moveTo({x:5, y:0})144 .moveTo({x:5, y:0})145 .moveTo({x:5, y:0})146 .moveTo({x:5, y:0})147 .moveTo({x:5, y:0})148 .moveTo({x:5, y:0})149 .moveTo({x:5, y:-1})150 .moveTo({x:5, y:-1})151 .moveTo({x:5, y:-1})152 .moveTo({x:5, y:-1})153 .moveTo({x:5, y:-1})154 .moveTo({x:4, y:-1})155 .moveTo({x:4, y:-1})156 .moveTo({x:4, y:-1})157 .moveTo({x:4, y:-1})158 .moveTo({x:4, y:-1})159 .moveTo({x:3, y:-1})160 .moveTo({x:3, y:-1})161 .moveTo({x:3, y:-1})162 .moveTo({x:3, y:-1})163 .moveTo({x:3, y:-1})164 .moveTo({x:2, y:-1})165 .moveTo({x:2, y:-1})166 .moveTo({x:2, y:-1})167 .moveTo({x:2, y:-1})168 .moveTo({x:2, y:-1})169 .moveTo({x:1, y:-1})170 .moveTo({x:1, y:-1})171 .moveTo({x:1, y:-1})172 .moveTo({x:1, y:-1})173 .moveTo({x:1, y:-1})174 .release();175 var ma = new wd.MultiAction().add(a1, a2, smile);176 return driver.performMultiAction(ma)177 // so you can see it178 .sleep(10000)179 .back().sleep(1000)180 .back().sleep(1000);181 });182 });...

Full Screen

Full Screen

data.js

Source:data.js Github

copy

Full Screen

1var data = [2 {3 id: 0,4 question: "Сколько пространства доступно вам?",5 options: [6 {7 userChoice: "Немало",8 moveTo: 19 },10 {11 userChoice: "Немного есть",12 moveTo: 213 },14 {15 userChoice: "Уголок в квартире",16 moveTo: 317 }18 ]19 },20 {21 id: 1,22 question: "Какую пользу больше желаете?",23 options: [24 {25 userChoice: "Передвижение",26 moveTo: 427 },28 {29 userChoice: "Яйца",30 moveTo: 531 },32 {33 userChoice: "Шерсть",34 moveTo: 635 }36 ]37 },{38 id: 2,39 question: "Шерсть нужна?",40 options: [41 {42 userChoice: "Да",43 moveTo: 1544 },45 {46 userChoice: "Нет",47 moveTo: 748 }49 ]50 },51 {52 id: 3,53 question: "Должно быть с ушами?",54 options: [55 {56 userChoice: "Да",57 moveTo: 958 },59 {60 userChoice: "Никаких ушей",61 moveTo: 862 }63 ]64 },65 {66 id: 4,67 result: "лошадь"68 },69 {70 id: 5,71 question: "Должно хоть немного летать?",72 options: [73 {74 userChoice: "Да, должно",75 moveTo: 1176 },77 {78 userChoice: "Никаких летать",79 moveTo: 780 }81 ]82 },83 {84 id: 6,85 question: "Хотите иметь возможность использовать для рекламы шоколада?",86 options: [87 {88 userChoice: "Нет",89 moveTo: 1390 },91 {92 userChoice: "Было бы неплохо",93 moveTo: 1294 }95 ]96 },97 98 {99 id: 7,100 question: "Ничего, что агрессивный?",101 options: [102 {103 userChoice: "Подойдёт",104 moveTo: 17105 },106 {107 userChoice: "Не подходит!",108 moveTo: 16109 }110 ]111 },112 {113 id: 8,114 question: "Что на счёт птички?",115 options: [116 {117 userChoice: "Идёт",118 moveTo: 5119 },120 {121 userChoice: "Не уверен",122 moveTo: 10123 }124 ]125 },126 {127 id: 9,128 result: "Кролик"129 },130 {131 id: 10,132 result: "Пчелы"133 },134 {135 id: 11,136 result: "Курица"137 },138 {139 id: 12,140 result: "Корова"141 },142 {143 id: 13,144 question: "Рогатых животных боитесь?",145 options: [146 {147 userChoice: "Всё ок",148 moveTo: 14149 },150 {151 userChoice: "Боюсь",152 moveTo: 15153 }154 ]155 },156 {157 id: 14,158 result: "Коза"159 },160 {161 id: 15,162 result: "Овца"163 },164 {165 id: 16,166 result: "Утка"167 },168 {169 id: 17,170 result: "Индюк"171 },172 {173 id: 18,174 question: "Подержать?",175 options: [176 {177 userChoice: "Да",178 moveTo: 19179 },180 {181 userChoice: "Нет",182 moveTo: 18183 }184 ]185 },186 {187 id: 19,188 result: "Гусь"189 }...

Full Screen

Full Screen

main.js

Source:main.js Github

copy

Full Screen

12 var canvas = document.getElementById("bezier");3 var context = document.getElementById("bezier").getContext("2d");4 context.beginPath();5 context.moveTo(353/4, 393/4);6 context.bezierCurveTo(586/4, 436/4, 1044/4, 198/4, 1905/4, 18/4);7 context.bezierCurveTo(617/4, 530/4, 348/4, 777/4, 114/4, 644/4);8 context.bezierCurveTo(-31.5, 464/4, 183/4, 123/4, 290/4, 8/4);9 context.bezierCurveTo(181/4, 197/4, 202/4, 359/4, 353/4, 393/4);10 context.strokeStyle = '#ffffff';11 context.stroke();12 context.fillStyle = '#ffffff';13 context.fill();141516 var can = document.getElementById("notes");17 var cnt = document.getElementById("notes").getContext("2d");18 cnt.beginPath();19 cnt.moveTo(10,0);20 cnt.lineTo(10, 399.7);21 cnt.lineWidth = 5;22 cnt.strokeStyle = '#ffffff';23 cnt.stroke();2425 cnt.moveTo(0,66.666666);26 cnt.lineTo(1250,66.666666);27 cnt.moveTo(0,133.333333);28 cnt.lineTo(1250,133.333333);29 cnt.moveTo(0,200);30 cnt.lineTo(1250,200);31 cnt.moveTo(0,266.666666);32 cnt.lineTo(1250,266.666666);33 cnt.moveTo(0,333.333333);34 cnt.lineTo(1250,333.333333);35 cnt.lineWidth = 1;36 cnt.strokeStyle = '#ffffff';37 cnt.stroke();3839 cnt.beginPath();40 cnt.moveTo(150, 133.3333);41 cnt.lineTo(150, 355);42 cnt.moveTo(237, 44);43 cnt.lineTo(237, 259);44 cnt.moveTo(357, 170);45 cnt.lineTo(357, 355);46 // cnt.moveTo(463, 70);47 // cnt.lineTo(463, 335);48 cnt.moveTo(497, 210);49 cnt.lineTo(497, 320);//prva mihna spod K50 cnt.moveTo(550, 260);51 cnt.lineTo(550, 333.3333);//druga mihna spod K52 cnt.moveTo(603, 310);53 cnt.lineTo(603, 345);//tretja mihna spod K54 cnt.moveTo(497, 211);55 cnt.lineTo(603, 311);//spodnja poševna K56 cnt.moveTo(497, 110);57 cnt.lineTo(497, 210);//prva mihna zgor K58 cnt.moveTo(550, 66.6666);59 cnt.lineTo(550, 168);//druga mihna zgor K60 cnt.moveTo(603, 55);61 cnt.lineTo(603, 129);//tretja mihna zgor K62 cnt.moveTo(497, 205);63 cnt.lineTo(603, 128);//zgornja poševna K64 cnt.moveTo(712, 235);65 cnt.lineTo(712, 350);66 cnt.moveTo(748, 55);67 cnt.lineTo(748, 170);68 cnt.moveTo(760, 200);69 cnt.lineTo(820, 200);70 cnt.lineWidth = 4;71 cnt.strokeStyle = '#ffffff';72 cnt.stroke();7374 cnt.beginPath();75 cnt.arc(132,355,18,0,2*Math.PI);76 cnt.moveTo(255,44);77 cnt.arc(255,44,18,0,2*Math.PI);78 cnt.moveTo(375,170);79 cnt.arc(375,170,18,0,2*Math.PI);80 // cnt.moveTo(445,333.3333);81 // cnt.arc(445,333.3333,18,0,2*Math.PI);82 // cnt.moveTo(445,235);83 // cnt.arc(445,235,18,0,2*Math.PI);84 cnt.moveTo(487,320);85 cnt.arc(487,320,10,0,2*Math.PI);86 cnt.moveTo(540,333.3333);87 cnt.arc(540,333.3333,10,0,2*Math.PI);88 cnt.moveTo(593,347);89 cnt.arc(593,347,10,0,2*Math.PI);90 cnt.moveTo(507,110);91 cnt.arc(507,110,10,0,2*Math.PI);92 cnt.moveTo(560,66.6666);93 cnt.arc(560,66.6666,10,0,2*Math.PI);94 cnt.moveTo(613,55);95 cnt.arc(613,55,10,0,2*Math.PI);96 cnt.moveTo(730,170);97 cnt.arc(730,170,18,0,2*Math.PI);98 cnt.moveTo(730,235);99 cnt.arc(730,235,18,0,2*Math.PI);100 cnt.strokeStyle = '#ffffff';101 cnt.stroke();102 cnt.fillStyle = '#ffffff';103 cnt.fill();104105 cnt.beginPath();106 cnt.moveTo(150,133.3333);107 cnt.bezierCurveTo(228, 186, 227, 264, 239, 260);108 cnt.moveTo(712, 348);109 cnt.bezierCurveTo(728, 361, 855, 346, 841, 288);110 cnt.moveTo(748, 57);111 cnt.bezierCurveTo(841, 33, 897, 114, 842, 139);112 cnt.lineWidth = 4;113 cnt.strokeStyle = '#ffffff';114 cnt.stroke();115116 117 ...

Full Screen

Full Screen

path1.js

Source:path1.js Github

copy

Full Screen

...8 }*/9 },10 // LIFE-CYCLE CALLBACKS:11 level1Move:function () {12 var m0=cc.moveTo(5,cc.v2(-46,79));13 var m1=cc.moveTo(4,cc.v2(-242,-7));14 var m2=cc.moveTo(1.5,cc.v2(-242,-90));15 var m3=cc.moveTo(2,cc.v2(-165,-142));16 var m4=cc.moveTo(3,cc.v2(35,-140));17 var m5=cc.moveTo(3,cc.v2(173,-162));18 var m6=cc.moveTo(3,cc.v2(315,-75));19 var m7=cc.moveTo(3,cc.v2(502,-80));20 var seq=cc.sequence([m0,m1,m2,m3,m4,m5,m6,m7]);21 this.node.runAction(seq);22 },23 level2Move:function () {24 25 var pos0=cc.v2(238,90);26 var pos1=cc.v2(187,205);27 var pos2=cc.v2(54,205);28 var pos3=cc.v2(5,94);29 var pos4=cc.v2(-230,60);30 var pos5=cc.v2(-219,-38);31 var pos6=cc.v2(138,-44);32 var pos7=cc.v2(117,-150);33 var pos8=cc.v2(-50,-183);34 var pos9=cc.v2(-50,-344);35 var m0=cc.moveTo(6,pos0);//636 var m1=cc.moveTo(2,pos1);//837 var m2=cc.moveTo(2.6,pos2);//10.638 var m3=cc.moveTo(2,pos3);//12.639 var m4=cc.moveTo(4.3,pos4);//16.940 var m5=cc.moveTo(2,pos5);//18.941 var m6=cc.moveTo(5.6,pos6);//24.542 var m7=cc.moveTo(2,pos7);//26.543 var m8=cc.moveTo(3.3,pos8);//29.844 var m9=cc.moveTo(6.6,pos9);//36.445 var seq=cc.sequence([m0,m1,m2,m3,m4,m5,m6,m7,m8,m9]);46 this.node.runAction(seq);47 },48 onLoad:function () {49 var S=cc.director.getScene();50 if(S.name=='level1'){51 this.level1Move();52 }53 if(S.name=='level2'){54 this.level2Move();55 }56 57 },58 59 /*path1(){60 //path1中的路径移动61 var m0=cc.moveTo(5,cc.v2(0,0));62 var m1=cc.moveTo(4,cc.v2(256,0));63 var m2=cc.moveTo(4,cc.v2(256,256));64 var m3=cc.moveTo(4,cc.v2(512,256));65 var m4=cc.moveTo(5,cc.v2(512,-64));66 var m5=cc.moveTo(5,cc.v2(832,-64));67 var m6=cc.moveTo(4,cc.v2(832,192));68 var m7=cc.moveTo(3,cc.v2(1024,192));69 70 var seq=cc.sequence([m0,m1,m2,m3,m4,m5,m6,m7]);71 72 73 },*/74 start () {75 },76 update (dt) {77 //path1中的路径移动78 /*var m1=cc.moveTo(4,cc.v2(256,0));79 var m2=cc.moveTo(4,cc.v2(256,256));80 var m3=cc.moveTo(4,cc.v2(512,256));81 var m4=cc.moveTo(5,cc.v2(512,-64));82 var m5=cc.moveTo(5,cc.v2(832,-64));83 var m6=cc.moveTo(4,cc.v2(832,192));84 var m7=cc.moveTo(3,cc.v2(1024,192));85 var seq=cc.sequence([m1,m2,m3,m4,m5,m6,m7]);86 //var seq=cc.sequence([seq1,seq2,seq3,seq4]);87 this.node.runAction(seq);*/88 /*this.schedule(function(){89 this.node.x+=64;90 },1,4,0);*/91 },...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var webdriverio = require('webdriverio');2var options = {3 desiredCapabilities: {4 }5};6 .remote(options)7 .init()8 .setValue('input[name="q"]','webdriverio')9 .keys('Enter')10 .getTitle().then(function(title) {11 console.log('Title was: ' + title);12 })13 .end();14var webdriverio = require('webdriverio');15var options = {16 desiredCapabilities: {17 }18};19 .remote(options)20 .init()21 .setValue('input[name="q"]','webdriverio')22 .keys('Enter')23 .getTitle().then(function(title) {24 console.log('Title was: ' + title);25 })26 .end();27var webdriverio = require('webdriverio');28var options = {29 desiredCapabilities: {30 }31};32 .remote(options)33 .init()34 .setValue('input[name="q"]','webdriverio')35 .keys('Enter')36 .getTitle().then(function(title) {37 console.log('Title was: ' + title);38 })39 .end();40var webdriverio = require('webdriverio');41var options = {42 desiredCapabilities: {43 }44};45 .remote(options)46 .init()47 .setValue('input[name="q"]','webdriverio')48 .keys('Enter')49 .getTitle().then(function(title) {50 console.log('Title was: ' + title);51 })52 .end();53var webdriverio = require('webdriverio');54var options = {55 desiredCapabilities: {56 }57};58 .remote(options)59 .init()

Full Screen

Using AI Code Generation

copy

Full Screen

1const assert = require('assert');2const { remote } = require('webdriverio');3(async () => {4 const browser = await remote({5 capabilities: {6 }7 })8 const rect = await browser.$('#search_input_react').getRect()9 await browser.moveTo(rect.x, rect.y)10 await browser.click(rect.x, rect.y)11 await browser.deleteSession()12})().catch((e) => console.error(e))13[0-0] DEBUG: COMMAND moveTo([object Object],[object Object])14[0-0] DEBUG: DATA { x: 0, y: 0 }15[0-0] DEBUG: COMMAND click([object Object],[object Object])16[0-0] DEBUG: DATA { x: 0, y: 0 }

Full Screen

Using AI Code Generation

copy

Full Screen

1browser.moveToObject('#elementId');2browser.moveTo('#elementId');3browser.moveTo('#elementId', 0, 0);4browser.moveToElement('#elementId', 0, 0);5browser.actions().mouseMove(element(by.id('elementId'))).perform();6browser.actions().mouseMove(element(by.id('elementId'))).perform();7browser.moveTo('#elementId', 0, 0);8browser.moveTo('#elementId', 0, 0);9browser.moveTo('#elementId', 0, 0);10browser.moveTo('#elementId', 0, 0);11browser.moveTo('#elementId', 0, 0);12browser.moveTo('#elementId', 0, 0);13browser.moveTo('#elementId', 0, 0);14browser.moveTo('#elementId', 0, 0);15browser.moveTo('#elementId', 0, 0);16browser.moveTo('#elementId', 0, 0);17browser.moveTo('#elementId', 0, 0);18browser.moveTo('#elementId', 0, 0);19browser.moveTo('#elementId', 0, 0);20browser.moveTo('#elementId', 0, 0);21browser.moveTo('#elementId', 0, 0);22browser.moveTo('#elementId', 0, 0

Full Screen

Using AI Code Generation

copy

Full Screen

1describe('Test', function() {2 it('should be able to move to an element', function () {3 var element = browser.element('input[name="q"]');4 browser.moveTo(element.value.ELEMENT, 0, 0);5 });6});7describe('Test', function() {8 it('should be able to move to an element', function () {9 var element = browser.element('input[name="q"]');10 browser.moveToObject(element.value.ELEMENT);11 });12});13describe('Test', function() {14 it('should be able to move to an element', function () {15 var element = browser.element('input[name="q"]');16 browser.moveToObject(element.value.ELEMENT);17 });18});

Full Screen

Using AI Code Generation

copy

Full Screen

1browser.moveToObject('.myelement');2browser.moveTo('.myelement');3browser.moveTo('.myelement', 0, 0);4browser.setValue('#myelement', 'myvalue');5browser.setValue('#myelement', 'myvalue');6browser.submitForm('#myelement');7browser.submitForm('#myelement');8browser.switchWindow('title or url');9browser.switchWindow('title or url');10browser.switchToFrame(0);11browser.switchToFrame(0);12browser.switchToParentFrame();13browser.switchToParentFrame();14browser.switchToWindow('title or url');15browser.switchToWindow('title or url');16browser.switchTab('title or url');17browser.switchTab('title or url');18browser.touchAction('.myelement', 'tap');19browser.touchAction('.myelement', 'tap');20browser.touchDown('.myelement');21browser.touchDown('.myelement');22browser.touchMove('.myelement');23browser.touchMove('.myelement

Full Screen

Using AI Code Generation

copy

Full Screen

1const { remote } = require('webdriverio');2(async () => {3 const browser = await remote({4 capabilities: {5 }6 })7 await browser.pause(3000)8 await browser.pause(3000)9 await browser.deleteSession()10})().catch((e) => console.error(e))11const { remote } = require('webdriverio');12(async () => {13 const browser = await remote({14 capabilities: {15 }16 })17 await browser.pause(3000)18 await browser.pause(3000)19 await browser.deleteSession()20})().catch((e) => console.error(e))21const { remote } = require('webdriverio');22(async () => {23 const browser = await remote({24 capabilities: {25 }26 })27 await browser.pause(3000)

Full Screen

WebdriverIO Tutorial

Wondering what could be a next-gen browser and mobile test automation framework that is also simple and concise? Yes, that’s right, it's WebdriverIO. Since the setup is very easy to follow compared to Selenium testing configuration, you can configure the features manually thereby being the center of attraction for automation testing. Therefore the testers adopt WedriverIO to fulfill their needs of browser testing.

Learn to run automation testing with WebdriverIO tutorial. Go from a beginner to a professional automation test expert with LambdaTest WebdriverIO tutorial.

Chapters

  1. Running Your First Automation Script - Learn the steps involved to execute your first Test Automation Script using WebdriverIO since the setup is very easy to follow and the features can be configured manually.

  2. Selenium Automation With WebdriverIO - Read more about automation testing with WebdriverIO and how it supports both browsers and mobile devices.

  3. Browser Commands For Selenium Testing - Understand more about the barriers faced while working on your Selenium Automation Scripts in WebdriverIO, the ‘browser’ object and how to use them?

  4. Handling Alerts & Overlay In Selenium - Learn different types of alerts faced during automation, how to handle these alerts and pops and also overlay modal in WebdriverIO.

  5. How To Use Selenium Locators? - Understand how Webdriver uses selenium locators in a most unique way since having to choose web elements very carefully for script execution is very important to get stable test results.

  6. Deep Selectors In Selenium WebdriverIO - The most popular automation testing framework that is extensively adopted by all the testers at a global level is WebdriverIO. Learn how you can use Deep Selectors in Selenium WebdriverIO.

  7. Handling Dropdown In Selenium - Learn more about handling dropdowns and how it's important while performing automated browser testing.

  8. Automated Monkey Testing with Selenium & WebdriverIO - Understand how you can leverage the amazing quality of WebdriverIO along with selenium framework to automate monkey testing of your website or web applications.

  9. JavaScript Testing with Selenium and WebdriverIO - Speed up your Javascript testing with Selenium and WebdriverIO.

  10. Cross Browser Testing With WebdriverIO - Learn more with this step-by-step tutorial about WebdriverIO framework and how cross-browser testing is done with WebdriverIO.

Run Webdriverio automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful