Skip to content

An implementation of chain_heal.c in Swift

Notifications You must be signed in to change notification settings

bbible3/chain-heal-swift

 
 

Repository files navigation

chain-heal

An implementation of chain_heal.c in Swift

This is a lab from CS360 (systems programming) and I thought it would be fun to see what a Swift version might look like.

The project needs to be compiled with -lm for rounding with rint — I do this:

swiftc main.swift Player.swift ChainInfo.swift Point.swift -lm -o chain_heal

and run the program like this:

Kyle $ ./chain_heal 1 2 4 500 0.25 < small.txt 
Urgosa_the_Healing_Shaman 0
Adam_the_Warrior 375
Chad_the_Priest 281
James_the_Lightning_Lord 211
Total_Healing 867

About

An implementation of chain_heal.c in Swift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%