import { Component, Input } from '@angular/core';
import { DataService } from 'src/services/data/data.service';

@Component({
  selector: 'movement-details',
  templateUrl: './movement-details.component.html',
  styleUrl: './movement-details.component.scss',
})
export class MovementDetailsComponent {
  @Input() movement: number = 0;

  strength: number = 0;
  jumpDistance: number = 0;

  public constructor(private dataAccessor: DataService) {}

  ngOnInit(): void {
    this.dataAccessor.strength$.subscribe((value) => {
      this.strength = value.value;
      console.log(this.strength);
    });
  }

  private calculateJumpingDistances(): void {
    // const jumpHeight = this.strength * 3;
    // const jumpDistance = jumpHeight * 3;
  }
}
