anchor.diff:    bitmapInfo.biClrUsed = 0;
     bitmapInfo.biClrImportant = 0;
   
  -  int bitmapMemorySize = (width * height) * bytesPerPixel;
  +  final bitmapMemorySize = (width * height) * bytesPerPixel;
     bitmapMemory =
         VirtualAlloc(nullptr, bitmapMemorySize, MEM_COMMIT, PAGE_READWRITE);
   
     // init other variables here
  -  blocksperwidth = Width / 10;
  -  blocksperheight = Height / 10;
  -  data.resize(blocksperheight, List<int>(blocksperwidth, 0));
  -
  -  // resetGame();
  -}
  -
  -void draw(
  -    int DeviceContext, RECT WindowRect, int X, int Y, int Width, int Height) {
  +  blocksPerWidth = (width / 10).floor();
  +  blocksPerHeight = (height / 10).floor();
  +  data = List.generate(
  +      blocksPerHeight, (e) => List.generate(blocksPerWidth, (e) => 0));
  +
  +  resetGame();
  +}
  +
  +void draw(int hdc, RECT rect, int x, int y, int width, int height) {
     // update memory state bitmap to window
     // this is a rect to rect copy
  -  final WindowWidth = WindowRect.right - WindowRect.left;
  -  final WindowHeight = WindowRect.bottom - WindowRect.top;
  +  final windowWidth = rect.right - rect.left;
  +  final windowHeight = rect.bottom - rect.top;
     StretchDIBits(
  -      DeviceContext,
  +      hdc,
         //X, Y, Width, Height, X, Y, Width, Height,
         0,
         0,
  -      BitmapWidth,
  -      BitmapHeight,
  +      bitmapWidth,
  +      bitmapHeight,
         0,
  -      WindowHeight + 1,
  -      WindowWidth,
  -      -WindowHeight,
  -      BitmapMemory,
  -      BitmapInfo,
  +      windowHeight + 1,
  +      windowWidth,
  +      -windowHeight,
  +      bitmapMemory,
  +      bitmapInfo.addressOf,
         DIB_RGB_COLORS,
         SRCCOPY);
  +}
  +
  +void update() {
  +  // Update game simulation
  +  // set everything in our 10x10 grid and have that write to memory
  +
  +  //move snake
  +  moveSnake();
  +
  +  // is the snake head colliding with apple?
  +  if (snakePoints[0].x == appleX && snakePoints[0].y == appleY) {
  +    collectApple();
  +  }
  +
  +  // check if snake is colliding with itself
  +  for (var i = 0; i < snakePoints.length; i++) {
  +    if (i > 0) {
  +      if (snakePoints[i].x == snakePoints[0].x &&
  +          snakePoints[i].y == snakePoints[0].y) {
  +        gameOver();
  +      }
  +    }
  +  }
  +
  +  setVectorToMemory();
   }
   
   int MainWindowProc(int hwnd, int uMsg, int wParam, int lParam) {
  
positive.code:         // up
          snakePoints[i].y -= 1;
          if (snakePoints[i].y < 0) {
            snakePoints[i].y = (bitmapHeight / 10) - 1;
          }
        }
      } else {
  
negative.code: bool isRunning = false;
  
  final bitmapInfo = BITMAPINFO.allocate();
  Pointer<Void> bitmapMemory = nullptr;
  int bitmapWidth;
  int bitmapHeight;
  int bytesPerPixel = 4;
  