Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
alxjrvs committed Dec 4, 2024
1 parent 133a392 commit f5216d0
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/faces/customFacesD.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { resultToFaces } from './utils/resultToFaces'
import { CustomFacesRollConfig } from './types'
import { D } from '~src/dice/D'
import { D } from '~dice'

export class CustomFacesD {
public sides: number
Expand Down
2 changes: 1 addition & 1 deletion src/faces/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RollConfig } from '~src/types'
import { NotationValidationResult } from '~src/notation/types'
import { NotationValidationResult } from '~notation'
import { RollArgument } from '~src/tower/types'
import { CustomFacesD } from './customFacesD'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { isDiceNotation } from '~src/notation/guards'
import { isDiceNotation } from '~notation'
import { DiceNotation } from '~src/types'
import { argumentToRollConfig } from '~src/tower/utils/argumentToRollConfig'
import { customCoreNotationPattern } from '../patterns'
Expand Down
3 changes: 1 addition & 2 deletions src/faces/validateCustomFacesNotation.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { NotationValidationResult } from '~src/notation/types'
import { isCustomFacesDiceNotation } from './guards'
import { CustomFacesNotationValidationResult } from './types'
import { customConfigToCustomFacesNotation } from './utils/customFacesConfigToCustomFacesNotation'
import { customFacesConfigToDescriptions } from './utils/customFacesConfigToDescription'
import { customFacesNotationToCustomFacesRollConfig } from './utils/customFacesNotationToCustomFacesRollConfig'
import { validateNotation } from '~src/notation/validateNotation'
import { validateNotation, NotationValidationResult } from '~notation'

export function validateCustomFacesNotation(
arg: string
Expand Down
2 changes: 1 addition & 1 deletion src/tower/__tests__/roll.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, test } from 'bun:test'

import { roll } from '../roll'
import { D } from '~src/dice/D'
import { D } from '~dice'

const loops = 9999

Expand Down
2 changes: 1 addition & 1 deletion src/tower/__tests__/utils/applyModifiers.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, spyOn, test } from 'bun:test'
import { Modifiers } from '~src/types'
import { D } from '~src/dice/D'
import { D } from '~dice'
import { RollParameters } from '~src/tower/types'
import {
applyModifiers,
Expand Down
2 changes: 1 addition & 1 deletion src/tower/__tests__/utils/argumentToRollParameters.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, test } from 'bun:test'
import { D } from '~src/dice/D'
import { D } from '~dice'
import { DiceNotation } from '~src/types'
import { argumentToRollParameters } from '~src/tower/utils/argumentToRollParameters'

Expand Down
2 changes: 1 addition & 1 deletion src/tower/guards.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { D } from '~src/dice/D'
import { D } from '~dice'
import { RollConfigArgument } from './types'

export function isD(arg: unknown): arg is D {
Expand Down
2 changes: 1 addition & 1 deletion src/tower/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RollConfig } from '~src/types'
import { D } from '~src/dice/D'
import { D } from '~dice'
import { DiceNotation } from '~src/types'

export interface RollConfigArgument extends Partial<RollConfig> {
Expand Down
2 changes: 1 addition & 1 deletion src/tower/utils/argumentToRollConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { RollConfig } from '~src/types'
import { isRollConfigArgument, isD } from '../guards'
import { RollArgument } from '../types'
import { isDiceNotation } from '~src/notation/guards'
import { isDiceNotation } from '~notation'
import { notationToRollConfig } from '~src/utils/notationToRollConfig'

export function argumentToRollConfig(argument: RollArgument): RollConfig {
Expand Down
2 changes: 1 addition & 1 deletion src/tower/utils/argumentToRollParameters.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { D } from '~src/dice/D'
import { D } from '~dice'
import { isD } from '../guards'
import { RollArgument, RollParameters } from '../types'
import { argumentToRollConfig } from './argumentToRollConfig'
Expand Down
16 changes: 11 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{
"compilerOptions": {
"paths": {
"~models": [
"./src/models/index.ts"
],
"~patterns": [
"./src/patterns.ts"
],
"~guards": [
"./src/guards.ts"
"~tower": [
"./src/tower/index.ts"
],
"~dice": [
"./src/dice/index.ts"
],
"~faces": [
"./src/faces/index.ts"
],
"~notation": [
"./src/notation/index.ts"
],
"~src/*": [
"./src/*"
Expand Down

0 comments on commit f5216d0

Please sign in to comment.