Socket
Socket
Sign inDemoInstall

@coveord/blitz-ui-2022

Package Overview
Dependencies
0
Maintainers
86
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.6 to 0.0.7

src/lib/ai/AggressiveAI.ts

2

package.json
{
"name": "@coveord/blitz-ui-2022",
"version": "0.0.6",
"version": "0.0.7",
"module": "dist/index.es.min.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

@@ -10,3 +10,5 @@ import { createSocket } from '../sockets/socket';

let ticks = createHistory<EnhancedTick>();
export type TicksStore = typeof ticks;
export const games = createHistory<typeof ticks>();

@@ -22,3 +24,3 @@

onClose: () => {
console.log(get(get(games).current).list);
console.log(get(get(games)?.current)?.list);
isConnected.set(false);

@@ -25,0 +27,0 @@ },

import { derived, writable } from "svelte/store";
export function createHistory<T>() {
const list = writable<T[]>([]);
const index = writable<number>(-1);
export function createHistory<T>(initial: T[] = []) {
const list = writable<T[]>(initial);
const index = writable<number>(initial.length > 0 ? 0 : -1);

@@ -7,0 +7,0 @@ const {subscribe} = derived([list, index], ([list, index]) => {

@@ -18,3 +18,3 @@ import type { EnhancedTick } from '../../gametypings';

const logs: GameLogEntry[] = [];
ticks.slice(Math.max(0, currentIndex - 50), currentIndex).forEach((tick) => {
ticks.slice(Math.max(0, currentIndex - 50), currentIndex + 1).forEach((tick) => {
const attackersAlreadyInLog = [];

@@ -42,1 +42,8 @@ Object.values(tick.allUnitsPerId)

};
export const getNextImportantTick = (ticks: EnhancedTick[], currentIndex: number): number | undefined => {
if (!ticks) {
return undefined;
}
return ticks.slice(currentIndex + 1).find((tick) => Object.values(tick.allUnitsPerId).find((unit) => !!unit.lastState.wasAttackedBy))?.tick;
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc